mirror of
https://github.com/openai/codex.git
synced 2026-02-01 22:47:52 +00:00
```
just log -h
if [ "${1:-}" = "--" ]; then shift; fi; cargo run -p codex-state --bin logs_client -- "$@"
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.21s
Running `target/debug/logs_client -h`
Tail Codex logs from state.sqlite with simple filters
Usage: logs_client [OPTIONS]
Options:
--codex-home <CODEX_HOME> Path to CODEX_HOME. Defaults to $CODEX_HOME or ~/.codex [env: CODEX_HOME=]
--db <DB> Direct path to the SQLite database. Overrides --codex-home
--level <LEVEL> Log level to match exactly (case-insensitive)
--from <RFC3339|UNIX> Start timestamp (RFC3339 or unix seconds)
--to <RFC3339|UNIX> End timestamp (RFC3339 or unix seconds)
--module <MODULE> Substring match on module_path
--file <FILE> Substring match on file path
--backfill <BACKFILL> Number of matching rows to show before tailing [default: 200]
--poll-ms <POLL_MS> Poll interval in milliseconds [default: 500]
-h, --help Print help
```
74 lines
1.9 KiB
Makefile
74 lines
1.9 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 "$@"
|
|
|
|
# Run the CLI version of the file-search crate.
|
|
file-search *args:
|
|
cargo run --bin codex-file-search -- "$@"
|
|
|
|
# Build the CLI and run the app-server test client
|
|
app-server-test-client *args:
|
|
cargo build -p codex-cli
|
|
cargo run -p codex-app-server-test-client -- --codex-bin ./target/debug/codex "$@"
|
|
|
|
# format code
|
|
fmt:
|
|
cargo fmt -- --config imports_granularity=Item 2>/dev/null
|
|
|
|
fix *args:
|
|
cargo clippy --fix --all-features --tests --allow-dirty "$@"
|
|
|
|
clippy:
|
|
cargo clippy --all-features --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.
|
|
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 &&" -- "$@"
|
|
|
|
bazel-test:
|
|
bazel test //... --keep_going
|
|
|
|
bazel-remote-test:
|
|
bazel test //... --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 codex-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
|
|
|
|
# Tail logs from the state SQLite database
|
|
log *args:
|
|
if [ "${1:-}" = "--" ]; then shift; fi; cargo run -p codex-state --bin logs_client -- "$@"
|