Files
dev/justfile
T
zeekay 4fe4cdd41c merge: openai/codex master (preserve Hanzo brand)
# Conflicts:
#	.github/pull_request_template.md
#	.github/workflows/rust-release-zsh.yml
#	.vscode/extensions.json
#	AGENTS.md
#	AGENTS.md~openai-upstream_main
#	codex-cli/.pack/package/bin/rg
#	codex-cli/bin/rg
#	codex-rs/app-server-protocol/src/protocol/v2.rs
#	codex-rs/app-server/src/codex_message_processor.rs
#	codex-rs/core/src/codex.rs
#	codex-rs/core/src/model_provider_info_tests.rs
#	codex-rs/core/src/models_manager/manager.rs
#	codex-rs/core/src/models_manager/manager_tests.rs
#	codex-rs/core/src/tools/handlers/multi_agents_v2/assign_task.rs
#	codex-rs/core/src/tools/spec_tests.rs
#	codex-rs/debug-client/Cargo.toml
#	codex-rs/debug-client/src/client.rs
#	codex-rs/debug-client/src/output.rs
#	codex-rs/debug-client/src/reader.rs
#	codex-rs/tools/src/agent_tool.rs
#	codex-rs/tools/src/agent_tool_tests.rs
#	codex-rs/tui/src/history_cell.rs
#	codex-rs/vendor/bubblewrap/NEWS.md
#	codex-rs/vendor/bubblewrap/README.md
#	codex-rs/vendor/bubblewrap/SECURITY.md
#	codex-rs/vendor/bubblewrap/bubblewrap.c
#	codex-rs/vendor/bubblewrap/meson.build
#	codex-rs/vendor/bubblewrap/meson_options.txt
#	codex-rs/vendor/bubblewrap/network.c
#	codex-rs/vendor/bubblewrap/release-checklist.md
#	codex-rs/vendor/bubblewrap/utils.c
#	codex-rs/windows-sandbox-rs/src/setup_orchestrator.rs
#	docs/contributing.md
#	scripts/codex_package/rg
2026-06-01 18:52:12 -07:00

112 lines
3.1 KiB
Makefile

set working-directory := "codex-rs"
set positional-arguments
# Display help
help:
just -l
# `codex`
alias c := codex
codex *args:
cargo run --bin codex -- "$@"
# `codex exec`
exec *args:
cargo run --bin codex -- exec "$@"
# Start codex-exec-server and run codex-tui.
[no-cd]
tui-with-exec-server *args:
./scripts/run_tui_with_exec_server.sh "$@"
# Run the CLI version of the file-search crate.
file-search *args:
cargo run --bin hanzo-file-search -- "$@"
# format code
fmt:
cargo fmt -- --config imports_granularity=Item 2>/dev/null
fix *args:
cargo clippy --fix --tests --allow-dirty "$@"
clippy *args:
cargo clippy --tests "$@"
install:
rustup show active-toolchain
cargo fetch
# Run `cargo nextest` since it's faster than `cargo test`, though including
# --no-fail-fast is important to ensure all tests are run.
#
# Run `cargo install cargo-nextest` if you don't have it installed.
# Prefer this for routine local runs; use explicit `cargo test --all-features`
# only when you specifically need full feature coverage.
test:
cargo nextest run --no-fail-fast
# Build and run Codex from source using Bazel.
# Note we have to use the combination of `[no-cd]` and `--run_under="cd $PWD &&"`
# to ensure that Bazel runs the command in the current working directory.
[no-cd]
bazel-codex *args:
bazel run //codex-rs/cli:codex --run_under="cd $PWD &&" -- "$@"
[no-cd]
bazel-lock-update:
bazel mod deps --lockfile_mode=update
[no-cd]
bazel-lock-check:
./scripts/check-module-bazel-lock.sh
bazel-test:
bazel test --test_tag_filters=-argument-comment-lint //... --keep_going
bazel-clippy:
bazel build --config=clippy -- //codex-rs/... -//codex-rs/v8-poc:all
[no-cd]
bazel-argument-comment-lint:
bazel build --config=argument-comment-lint -- $(./tools/argument-comment-lint/list-bazel-targets.sh)
bazel-remote-test:
bazel test --test_tag_filters=-argument-comment-lint //... --config=remote --platforms=//:rbe --keep_going
build-for-release:
bazel build //codex-rs/cli:release_binaries --config=remote
# Run the MCP server
mcp-server-run *args:
cargo run -p hanzo-mcp-server -- "$@"
# Regenerate the json schema for config.toml from the current config types.
write-config-schema:
cargo run -p codex-core --bin codex-write-config-schema
# Regenerate vendored app-server protocol schema artifacts.
write-app-server-schema *args:
cargo run -p codex-app-server-protocol --bin write_schema_fixtures -- "$@"
[no-cd]
write-hooks-schema:
cargo run --manifest-path ./codex-rs/Cargo.toml -p codex-hooks --bin write_hooks_schema_fixtures
# Run the argument-comment Dylint checks across codex-rs.
[no-cd]
argument-comment-lint *args:
if [ "$#" -eq 0 ]; then \
bazel build --config=argument-comment-lint -- $(./tools/argument-comment-lint/list-bazel-targets.sh); \
else \
./tools/argument-comment-lint/run-prebuilt-linter.py "$@"; \
fi
[no-cd]
argument-comment-lint-from-source *args:
./tools/argument-comment-lint/run.py "$@"
# Tail logs from the state SQLite database
log *args:
if [ "${1:-}" = "--" ]; then shift; fi; cargo run -p codex-state --bin logs_client -- "$@"