Skip to content

Commit c701a27

Browse files
committed
first init
0 parents  commit c701a27

30 files changed

Lines changed: 4861 additions & 0 deletions
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Bug report
2+
description: Report a reproducible problem using sanitized information.
3+
title: "[Bug]: "
4+
labels:
5+
- bug
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for helping improve the project.
11+
12+
**Do not paste credentials, tokens, authentication files, private research data, participant data, or unredacted logs.** Use synthetic values and follow `SECURITY.md` for vulnerabilities.
13+
14+
- type: input
15+
id: version
16+
attributes:
17+
label: Version or commit
18+
description: Provide a release tag or commit hash, not account information.
19+
placeholder: main at abc1234
20+
validations:
21+
required: true
22+
23+
- type: input
24+
id: environment
25+
attributes:
26+
label: Environment
27+
description: Operating system, shell, Codex CLI version, and direnv version.
28+
placeholder: macOS 15; zsh 5.9; Codex 0.x; direnv 2.x
29+
validations:
30+
required: true
31+
32+
- type: textarea
33+
id: reproduction
34+
attributes:
35+
label: Minimal sanitized reproduction
36+
description: Use synthetic paths, provider names, URLs, models, and credentials.
37+
placeholder: Describe the smallest sequence that reproduces the problem.
38+
validations:
39+
required: true
40+
41+
- type: textarea
42+
id: expected
43+
attributes:
44+
label: Expected behavior
45+
validations:
46+
required: true
47+
48+
- type: textarea
49+
id: observed
50+
attributes:
51+
label: Observed behavior
52+
description: Redact usernames, home paths, tokens, headers, research data, and participant information.
53+
validations:
54+
required: true

‎.github/ISSUE_TEMPLATE/config.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Report a security vulnerability privately
4+
url: https://github.com/FritscheLab/codex-contexts/security/advisories/new
5+
about: Do not disclose an unpatched vulnerability, credential, or sensitive data in a public issue.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Feature request
2+
description: Propose a focused improvement without sharing sensitive information.
3+
title: "[Feature]: "
4+
labels:
5+
- enhancement
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Describe the workflow and safety boundary, not private project content.
11+
12+
**Do not paste credentials, tokens, authentication files, private research data, participant data, or unredacted logs.**
13+
14+
- type: textarea
15+
id: problem
16+
attributes:
17+
label: Problem or need
18+
description: Explain the general workflow problem with synthetic examples.
19+
validations:
20+
required: true
21+
- type: textarea
22+
id: proposal
23+
attributes:
24+
label: Proposed behavior
25+
description: Describe the smallest useful change and its expected interface.
26+
validations:
27+
required: true
28+
29+
- type: textarea
30+
id: alternatives
31+
attributes:
32+
label: Alternatives considered
33+
description: Include current workarounds and important tradeoffs, if any.
34+
35+
- type: textarea
36+
id: safety_impact
37+
attributes:
38+
label: Identity, credential, or data-governance impact
39+
description: State whether the change affects credentials, generated files, providers, or research-data handling.
40+
validations:
41+
required: true

‎.github/markdown-link-check.json‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"ignorePatterns": [
3+
{
4+
"pattern": "^https?://"
5+
},
6+
{
7+
"pattern": "^mailto:"
8+
}
9+
],
10+
"retryOn429": true
11+
}

‎.github/mermaid-puppeteer.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"args": ["--no-sandbox"]
3+
}

‎.github/pull_request_template.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Summary
2+
3+
Describe the user-facing change and why it is needed.
4+
5+
## Validation
6+
7+
List the commands run and their results. Note anything not tested.
8+
9+
## Security or data-handling impact
10+
11+
Describe any effect on credentials, identity selection, provider traffic, or
12+
research-data handling. Do not attach secrets, authentication files, private
13+
research data, participant data, or unredacted logs.

‎.github/workflows/ci.yml‎

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
permissions:
8+
contents: read
9+
10+
env:
11+
CODEX_CLI_VERSION: "0.145.0"
12+
13+
jobs:
14+
test:
15+
name: Test (${{ matrix.os }})
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
os:
20+
- ubuntu-latest
21+
- macos-latest
22+
runs-on: ${{ matrix.os }}
23+
steps:
24+
- name: Check out repository
25+
uses: actions/checkout@v4
26+
27+
- name: Set up Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: "22"
31+
32+
- name: Install Ubuntu dependencies
33+
if: runner.os == 'Linux'
34+
run: |
35+
sudo apt-get update
36+
sudo apt-get install --yes direnv expect jq
37+
38+
- name: Install macOS dependencies
39+
if: runner.os == 'macOS'
40+
run: brew install direnv jq
41+
42+
- name: Install supported Codex CLI
43+
run: npm install --global "@openai/codex@${CODEX_CLI_VERSION}"
44+
45+
- name: Check Bash syntax
46+
run: bash -n bin/codex-home bin/install-macos-open-with tests/test.sh
47+
48+
- name: Run tests
49+
run: ./tests/test.sh
50+
51+
documentation:
52+
name: Documentation checks
53+
runs-on: ubuntu-latest
54+
steps:
55+
- name: Check out repository
56+
uses: actions/checkout@v4
57+
58+
- name: Set up Node.js
59+
uses: actions/setup-node@v4
60+
with:
61+
node-version: "22"
62+
63+
- name: Install documentation checkers
64+
run: |
65+
npm install --global markdown-link-check@3.13.7
66+
npm install --global @mermaid-js/mermaid-cli@11.12.0
67+
68+
- name: Check Markdown links
69+
run: |
70+
find . -type f -name '*.md' -not -path './.git/*' -print0 \
71+
| xargs -0 -n 1 markdown-link-check \
72+
--config .github/markdown-link-check.json
73+
74+
- name: Check Mermaid syntax
75+
shell: bash
76+
run: |
77+
mapfile -t diagrams < <(grep -RIl '^```mermaid' \
78+
--include='*.md' --exclude-dir=.git .)
79+
for index in "${!diagrams[@]}"; do
80+
mmdc --quiet \
81+
--input "${diagrams[$index]}" \
82+
--output "${RUNNER_TEMP}/mermaid-${index}.md" \
83+
--puppeteerConfigFile .github/mermaid-puppeteer.json
84+
done

‎.gitignore‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.DS_Store
2+
3+
# Secrets belong in ~/.codex-homes/<identity>/.env, never in this repository.
4+
.env
5+
.env.*
6+
!.env.example
7+

‎CITATION.cff‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
cff-version: 1.2.0
2+
message: "If this software supports your work, please cite it using this metadata."
3+
type: software
4+
license: MIT
5+
title: "Codex Contexts"
6+
abstract: >-
7+
A command-line utility for keeping Codex authentication identities and API
8+
provider configurations separate and selecting them per project.
9+
authors:
10+
- family-names: "Fritsche"
11+
given-names: "Lars"
12+
repository-code: "https://github.com/FritscheLab/codex-contexts"
13+
url: "https://github.com/FritscheLab/codex-contexts"
14+
keywords:
15+
- "Codex"
16+
- "credential separation"
17+
- "developer tooling"
18+
- "direnv"

‎CONTRIBUTING.md‎

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Contributing
2+
3+
Contributions that make identity selection safer, clearer, or more portable are
4+
welcome. Please keep changes focused and avoid adding credential storage or
5+
provider-specific assumptions to the common workflow.
6+
7+
## Before opening an issue or pull request
8+
9+
- Never include credentials, access tokens, authentication files, private
10+
research data, participant data, or unredacted logs.
11+
- Report a suspected vulnerability privately according to
12+
[SECURITY.md](SECURITY.md), not in a public issue.
13+
- Search existing issues and test the current `main` branch when practical.
14+
15+
## Development setup
16+
17+
Follow [INSTALLATION.md](INSTALLATION.md), then run:
18+
19+
```bash
20+
./tests/test.sh
21+
```
22+
23+
Keep the helper compatible with Bash 3.2, including the system Bash on macOS.
24+
The default tests must run without credentials or a live provider.
25+
26+
Generated configuration has been checked with Codex CLI 0.145.0. Rerun the
27+
tests after updating Codex because its settings and provider support can change.
28+
29+
## Making a change
30+
31+
1. Create a short-lived branch from `main`.
32+
2. Add or update regression tests for behavior changes.
33+
3. Update user documentation when commands, generated files, risks, or
34+
prerequisites change.
35+
4. Run the test suite and Bash syntax checks locally:
36+
37+
```bash
38+
bash -n bin/codex-home bin/install-macos-open-with tests/test.sh
39+
./tests/test.sh
40+
```
41+
42+
5. Open a pull request explaining what changes for users, how you tested it,
43+
and any remaining limits. Use synthetic examples and remove sensitive
44+
information from logs.
45+
46+
For a new API provider or model path, document the exact provider, protocol,
47+
model, authentication method, and tested tool behavior. A successful model
48+
listing or plain-text response is not enough to establish full Codex
49+
compatibility.
50+
51+
## Update the printable cheatsheet
52+
53+
Edit [docs/build-cheatsheet.py](docs/build-cheatsheet.py), then rebuild the PDF
54+
in a Python environment with ReportLab installed:
55+
56+
```bash
57+
python3 docs/build-cheatsheet.py
58+
```
59+
60+
Keep it to two pages and inspect both pages after rebuilding. Command text
61+
should remain selectable and fit without clipping.

0 commit comments

Comments
 (0)