Skip to content

Latest commit

 

History

History
94 lines (66 loc) · 3.76 KB

File metadata and controls

94 lines (66 loc) · 3.76 KB

Installing & building

System requirements

Requirement Details
Operating systems macOS 12+, Ubuntu 20.04+/Debian 10+, or Windows 11 via WSL2
Git (optional, recommended) 2.23+ for built-in PR helpers
RAM 4-GB minimum (8-GB recommended)

Install the published package

Most users should install the published @hasna/codewith package:

bun install -g @hasna/codewith

Codewith can also be installed through npm:

npm install -g @hasna/codewith

Then run codewith to get started. Codewith stores its local state in ~/.codewith by default.

Build from source

If you want to hack on Codewith itself, clone the repository and build with Rust:

# Clone the repository and navigate to the root of the Cargo workspace.
git clone https://github.com/hasna/codewith.git
cd codewith/codex-rs

# Install the Rust toolchain, if necessary.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
rustup component add rustfmt
rustup component add clippy
# Install helper tools used by the workspace justfile:
cargo install --locked just
# Install nextest for the `just test` helper.
cargo install --locked cargo-nextest

# Build Codewith.
cargo build

# Launch the TUI with a sample prompt.
cargo run --bin codewith -- "explain this codebase to me"

# After making changes, use the root justfile helpers (they default to codex-rs):
just fmt
just fix -p <crate-you-touched>

# Run the relevant tests (project-specific is fastest), for example:
just test -p codex-tui
# `just test` runs the test suite via nextest:
just test
# Avoid `--all-features` for routine local runs because it increases build
# time and `target/` disk usage by compiling additional feature combinations.

Download a prebuilt binary from GitHub Releases

If you do not want a package-manager install and do not need to build from source, you can download a platform binary from the latest Codewith GitHub Release.

Each GitHub Release contains many executables, but in practice, you likely want one of these:

  • macOS
    • Apple Silicon/arm64: codewith-aarch64-apple-darwin.tar.gz
    • x86_64 (older Mac hardware): codewith-x86_64-apple-darwin.tar.gz
  • Linux
    • x86_64: codewith-x86_64-unknown-linux-musl.tar.gz
    • arm64: codewith-aarch64-unknown-linux-musl.tar.gz

Each archive contains a single entry with the platform baked into the name (e.g., codewith-x86_64-unknown-linux-musl), so you likely want to rename it to codewith after extracting it.

The GitHub Release also contains a DotSlash file for Codewith. Using a DotSlash file makes it possible to make a lightweight commit to source control to ensure all contributors use the same version of an executable, regardless of what platform they use for development.

Tracing / verbose logging

Codewith is written in Rust, so it honors the RUST_LOG environment variable to configure its logging behavior.

The TUI records diagnostics in bounded local stores by default. Set log_dir explicitly to enable a plaintext TUI log for a run:

codewith -c log_dir=./.codewith-log
tail -F ./.codewith-log/codex-tui.log

The non-interactive mode (codewith exec) defaults to RUST_LOG=error, but messages are printed inline, so there is no need to monitor a separate file.

See the Rust documentation on RUST_LOG for more information on the configuration options.