Base: codex-main originale (prima del fork aKode)

This commit is contained in:
Andrea
2026-11-09 10:37:42 +01:00
commit 7874033c81
10166 changed files with 2728937 additions and 0 deletions

49
docs/CLA.md Normal file
View File

@@ -0,0 +1,49 @@
# Individual Contributor License Agreement (v1.0, OpenAI)
_Based on the Apache Software Foundation Individual CLA v 2.2._
By commenting **“I have read the CLA Document and I hereby sign the CLA”**
on a Pull Request, **you (“Contributor”) agree to the following terms** for any
past and future “Contributions” submitted to the **OpenAI Codex CLI project
(the “Project”)**.
---
## 1. Definitions
- **“Contribution”** – any original work of authorship submitted to the Project
(code, documentation, designs, etc.).
- **“You” / “Your”** – the individual (or legal entity) posting the acceptance
comment.
## 2. Copyright License
You grant **OpenAI, Inc.** and all recipients of software distributed by the
Project a perpetual, worldwide, non‑exclusive, royalty‑free, irrevocable
license to reproduce, prepare derivative works of, publicly display, publicly
perform, sublicense, and distribute Your Contributions and derivative works.
## 3. Patent License
You grant **OpenAI, Inc.** and all recipients of the Project a perpetual,
worldwide, non‑exclusive, royalty‑free, irrevocable (except as below) patent
license to make, have made, use, sell, offer to sell, import, and otherwise
transfer Your Contributions alone or in combination with the Project.
If any entity brings patent litigation alleging that the Project or a
Contribution infringes a patent, the patent licenses granted by You to that
entity under this CLA terminate.
## 4. Representations
1. You are legally entitled to grant the licenses above.
2. Each Contribution is either Your original creation or You have authority to
submit it under this CLA.
3. Your Contributions are provided **“AS IS”** without warranties of any kind.
4. You will notify the Project if any statement above becomes inaccurate.
## 5. Miscellany
This Agreement is governed by the laws of the **State of California**, USA,
excluding its conflict‑of‑laws rules. If any provision is held unenforceable,
the remaining provisions remain in force.

3
docs/agents_md.md Normal file
View File

@@ -0,0 +1,3 @@
# AGENTS.md
For information about AGENTS.md, see [this documentation](https://developers.openai.com/codex/guides/agents-md).

3
docs/authentication.md Normal file
View File

@@ -0,0 +1,3 @@
# Authentication
For information about Codex CLI authentication, see [this documentation](https://developers.openai.com/codex/auth).

15
docs/config.md Normal file
View File

@@ -0,0 +1,15 @@
# Configuration
For basic configuration instructions, see [this documentation](https://developers.openai.com/codex/config-basic).
For advanced configuration instructions, see [this documentation](https://developers.openai.com/codex/config-advanced).
For a full configuration reference, see [this documentation](https://developers.openai.com/codex/config-reference).
## Lifecycle hooks
Admins can set top-level `allow_managed_hooks_only = true` in
`requirements.toml` to ignore user, project, and session hook configs while
still allowing managed hooks from requirements and managed config layers. This
setting is only supported in `requirements.toml`; putting it in `config.toml`
does not enable managed-hooks-only mode.

39
docs/contributing.md Normal file
View File

@@ -0,0 +1,39 @@
## Contributing
We welcome community contributions through the [openai/codex issue tracker](https://github.com/openai/codex/issues). Bug reports, root-cause analyses, and feature requests help us understand what matters most and improve Codex.
**We do not accept external code contributions or pull requests.**
### Why we do not accept external code contributions
Effective changes to Codex require architectural context, an understanding of system-level constraints, and visibility into the project's roadmap. External pull requests often focus on issues that are lower priority, affect a small number of users, or need substantial changes to fit the broader system. Reviewing and iterating on those changes can take more time than implementing a fix directly, diverting attention from higher-priority work.
Community expertise is most valuable when shared through detailed bug reports, reproduction steps, logs, root-cause analysis, and design discussions in issues. Understanding the problem, identifying the right solution, and prioritizing the work are typically the hard parts; implementation is comparatively straightforward with the help of Codex itself.
For these reasons, we focus community contributions on issue reports, analysis, and feedback, while the Codex team handles code changes.
### Reporting bugs
Before opening a new issue, search the issue tracker to see whether the problem has already been reported. If it has, add any new information to the existing issue.
When reporting a bug, include as much relevant detail as possible:
- Clear, detailed steps to reproduce the problem.
- Expected and actual behavior.
- Your Codex version, operating system, and other relevant environment details.
- Logs, error messages, or other diagnostic information, with sensitive information removed.
- Root-cause analysis, technical observations, or potential approaches to a fix, if available.
### Requesting features
Open a feature request in the issue tracker, or upvote an existing request that describes the same need. Explain your use case, the behavior you would like, and why it would improve your workflow.
### Community values
- **Be kind and inclusive.** Treat others with respect; we follow the [Contributor Covenant](https://www.contributor-covenant.org/).
- **Assume good intent.** Written communication is hard, so err on the side of generosity.
- **Share what you learn.** Reproduction details, logs, and analysis help the entire community.
### Security
If you discover a security vulnerability, follow the [security policy](../SECURITY.md) instead of reporting it in a public issue.

3
docs/example-config.md Normal file
View File

@@ -0,0 +1,3 @@
# Sample configuration
For a sample configuration file, see [this documentation](https://developers.openai.com/codex/config-sample).

3
docs/exec.md Normal file
View File

@@ -0,0 +1,3 @@
# Non-interactive mode
For information about non-interactive mode, see [this documentation](https://developers.openai.com/codex/noninteractive).

3
docs/execpolicy.md Normal file
View File

@@ -0,0 +1,3 @@
# Execution policy
For an overview of execution policy rules, see [this documentation](https://developers.openai.com/codex/exec-policy).

3
docs/getting-started.md Normal file
View File

@@ -0,0 +1,3 @@
# Getting started with Codex CLI
For an overview of Codex CLI features, see [this documentation](https://developers.openai.com/codex/cli/features#running-in-interactive-mode).

65
docs/install.md Normal file
View File

@@ -0,0 +1,65 @@
## 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) |
### DotSlash
The GitHub Release also contains a [DotSlash](https://dotslash-cli.com/) file for the Codex CLI named `codex`. 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.
### Build from source
```bash
# Clone the repository and navigate to the root of the Cargo workspace.
git clone https://github.com/openai/codex.git
cd codex/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
# DotSlash fetches pinned development tools such as buildifier on first use.
cargo install --locked dotslash
# Install nextest for the `just test` helper.
cargo install --locked cargo-nextest
# Build Codex.
cargo build
# Launch the TUI with a sample prompt.
cargo run --bin codex -- "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.
```
## Tracing / verbose logging
Codex 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:
```bash
codex -c log_dir=./.codex-log
tail -F ./.codex-log/codex-tui.log
```
The non-interactive mode (`codex 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`](https://docs.rs/env_logger/latest/env_logger/#enabling-logging) for more information on the configuration options.

3
docs/license.md Normal file
View File

@@ -0,0 +1,3 @@
## License
This repository is licensed under the [Apache-2.0 License](../LICENSE).

8
docs/open-source-fund.md Normal file
View File

@@ -0,0 +1,8 @@
## Codex open source fund
We're excited to launch a **$1 million initiative** supporting open source projects that use Codex CLI and other OpenAI models.
- Grants are awarded up to **$25,000** API credits.
- Applications are reviewed **on a rolling basis**.
**Interested? [Apply here](https://openai.com/form/codex-open-source-fund/).**

3
docs/sandbox.md Normal file
View File

@@ -0,0 +1,3 @@
## Sandbox & approvals
For information about Codex sandboxing and approvals, see [this documentation](https://developers.openai.com/codex/security).

3
docs/skills.md Normal file
View File

@@ -0,0 +1,3 @@
# Skills
For information about skills, refer to [this documentation](https://developers.openai.com/codex/skills).

3
docs/slash_commands.md Normal file
View File

@@ -0,0 +1,3 @@
# Slash commands
For an overview of Codex CLI slash commands, see [this documentation](https://developers.openai.com/codex/cli/slash-commands).