Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@ name: CI

on:
push:
branches: [main]
branches: [main, dev, "**"]
pull_request:
branches: [main]
branches: [main, dev, "**"]

permissions:
contents: read

env:
CARGO_TERM_COLOR: always
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
check:
Expand All @@ -25,10 +24,10 @@ jobs:

- uses: Swatinem/rust-cache@v2

- name: Install OpenSSL
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libssl-dev pkg-config
sudo apt-get install -y libssl-dev pkg-config ripgrep

- name: Check formatting
run: cargo fmt --check --all
Expand Down
69 changes: 64 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,74 @@ on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]
Comment on lines +7 to +8

@cubic-dev-ai cubic-dev-ai Bot Apr 2, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: The PR trigger is missing types: [closed], so merged PRs won’t reliably satisfy the pull_request.merged gate and release jobs can be skipped.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/release.yml, line 7:

<comment>The PR trigger is missing `types: [closed]`, so merged PRs won’t reliably satisfy the `pull_request.merged` gate and release jobs can be skipped.</comment>

<file context>
@@ -4,17 +4,74 @@ on:
   push:
     branches: [main]
     tags: ["v*"]
+  pull_request:
+    branches: [main]
 
</file context>
Suggested change
pull_request:
branches: [main]
pull_request:
branches: [main]
types: [closed]
Fix with Cubic


# Only run release jobs when:
# - A PR is merged to main (from dev or any branch)
# - A version tag is pushed (v*)
permissions:
contents: write

env:
CARGO_TERM_COLOR: always
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
BINARY_NAME: nca

jobs:
# Determine if this is a release-worthy push
should-release:
runs-on: ubuntu-latest
outputs:
value: ${{ steps.check.outputs.should_release }}
steps:
- name: Check release conditions
id: check
run: |
# Release on PR merge to main
if [[ "${{ github.event.pull_request.merged }}" == "true" ]]; then
echo "should_release=true" >> "$GITHUB_OUTPUT"
echo "trigger=PR merge to main" >> "$GITHUB_OUTPUT"
# Release on tag push
elif [[ "${{ startsWith(github.ref, 'refs/tags/v') }}" == "true" ]]; then
echo "should_release=true" >> "$GITHUB_OUTPUT"
echo "trigger=Tag push" >> "$GITHUB_OUTPUT"
else
echo "should_release=false" >> "$GITHUB_OUTPUT"
echo "trigger=Non-release push" >> "$GITHUB_OUTPUT"
fi

# CI check (required before release)
ci-check:
needs: should-release
if: needs.should-release.outputs.value == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v2

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libssl-dev pkg-config ripgrep

- name: Check formatting
run: cargo fmt --check --all

- name: Clippy
run: cargo clippy --workspace -- -D warnings

- name: Test
run: cargo test --workspace

# Multi-platform build
build:
needs: [should-release, ci-check]
if: needs.should-release.outputs.value == 'true'
strategy:
matrix:
include:
Expand Down Expand Up @@ -63,10 +120,11 @@ jobs:
name: ${{ env.BINARY_NAME }}-${{ matrix.target }}
path: ${{ env.BINARY_NAME }}-${{ matrix.target }}.${{ matrix.archive }}

# Create GitHub Release (only on tags)
release:
needs: build
needs: [should-release, build]
if: needs.should-release.outputs.value == 'true' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4

Expand All @@ -83,10 +141,11 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Update install script (only on tags)
update-install-script:
needs: release
needs: [should-release, release]
if: needs.should-release.outputs.value == 'true' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4

Expand Down
12 changes: 7 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ members = [
]

[workspace.package]
version = "0.2.0"
version = "0.3.0"
edition = "2024"
license = "MIT"
repository = "https://github.com/madebyaris/native-cli-ai"
Expand Down
32 changes: 28 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ Pre-built binaries for every release are available on the [Releases](https://git
|---|---|
| macOS (Apple Silicon) | `aarch64-apple-darwin` |
| macOS (Intel) | `x86_64-apple-darwin` |
| Linux (x86_64, glibc) | `x86_64-unknown-linux-gnu` |
| Linux (x86_64, static) | `x86_64-unknown-linux-musl` |
| Linux (ARM64) | `aarch64-unknown-linux-gnu` |
| Linux (x86_64) | `x86_64-unknown-linux-gnu` |

### Build from source

Expand Down Expand Up @@ -273,6 +271,17 @@ The system prompt is layered in this order:

The built-in tool surface includes filesystem editing, search, diffing, patching, shell execution, web access, `ask_question`, and `spawn_subagent`. MCP tools are loaded dynamically when configured, so the available tool set can grow with your environment.

### Search And Edit Tools

Recent search/edit improvements are aimed at making agent file work less brittle:

- `search_code` now returns structured JSON match objects instead of raw `rg` text.
- `search_code` treats ripgrep exit code `1` as a successful empty result, not a failure.
- `search_code` supports `path`, `glob`, `fixed_strings`, `case_sensitive`, `word`, `context_before`, `context_after`, and `max_results`.
- `query_symbols` is a literal Rust symbol lookup, not an implicit regex expansion of user input.
- `edit_file` and `apply_patch` now fail loudly on ambiguous single-match edits instead of silently changing the first occurrence.
- `replace_match` can edit a specific search result by exact `path`, `line`, and `column`, which makes search -> edit flows much safer.

## Crate Layout

| Crate | Responsibility |
Expand All @@ -295,7 +304,22 @@ In practice, that means you can start small, branch out when a task gets bigger,

## Documentation

The root README is the quick-start guide. Use the docs folder for deeper detail:
Full user-facing documentation lives in [`docs/documentation/`](docs/documentation/index.md):

| Page | Description |
|---|---|
| [Getting Started](docs/documentation/getting-started.md) | Installation, first run, and initial configuration |
| [Commands](docs/documentation/commands.md) | Complete CLI command and flag reference |
| [Interactive Mode](docs/documentation/interactive-mode.md) | TUI, REPL, slash commands, keyboard shortcuts |
| [Configuration](docs/documentation/configuration.md) | Config files, TOML format, and environment variables |
| [Providers](docs/documentation/providers.md) | LLM provider setup — MiniMax, Anthropic, OpenAI, OpenRouter |
| [Tools](docs/documentation/tools.md) | All agent tools — file ops, search, shell, web, and more |
| [Sessions](docs/documentation/sessions.md) | Session lifecycle, persistence, resume, and management |
| [Permissions](docs/documentation/permissions.md) | Approval system, permission modes, and safe mode |
| [Skills](docs/documentation/skills.md) | Skill discovery, installation, and authoring |
| [Advanced](docs/documentation/advanced.md) | Sub-agents, MCP servers, hooks, orchestration, and IPC |

Internal design docs:

- [Product Requirements](docs/prd.md)
- [Tech Stack](docs/tech-stack.md)
Expand Down
Loading
Loading