Skip to content
Open
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
20 changes: 20 additions & 0 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: πŸ§ͺ Grok CLI Test Workflow

on:
push:
branches: [ main ]
pull_request:
branches: [ main, develop, feat/*, fix/* ]

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: bun install
- run: bun run lint || echo "Lint skipped"
- run: bun test --watch=false
- run: bun audit || echo "Audit skipped"
108 changes: 108 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# Contributing to Grok CLI

_Last updated: November 2025_

Thank you for your interest in contributing to Grok CLI!
We welcome contributions from the community, including bug fixes, new features, documentation improvements, and tests.

---

## πŸ› οΈ Getting Started

**1. Fork the repository** and clone it locally:

```bash
git clone https://github.com/<your-username>/grok-cli.git
cd grok-cli
````

**2. Install dependencies**:

```bash
bun install
```
**3. Build the project**:

```bash
bun run build
```
**4. Run the CLI locally**:

```bash
bun run dev
```

---

## πŸ“‹ Contribution Guidelines

* **Branching**:

* Create a feature branch from `main`:

```bash
git checkout -b feature/my-feature
```
* Use descriptive branch names: `feature/`, `bugfix/`, `docs/`

* **Commits**:

* Write clear, concise commit messages:

```
feat: add new Fast Apply command
fix: resolve issue with file upload
docs: update README with new instructions
```
* Follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)

* **Coding Style**:

* TypeScript for all source files.
* Functional React components (hooks) for UI components.
* Add JSDoc comments for public functions.
* Follow existing patterns in the project.

* **Tests**:

* Write tests for new functionality or bug fixes.
* Ensure all existing tests pass:

```bash
bun run test
```

---

## πŸ”„ Pull Requests

1. **Fork & branch** your changes.
2. **Commit** following the guidelines above.
3. **Push** your branch:

```bash
git push origin feature/my-feature
```
4. **Open a pull request** against `main`.
5. **Describe your changes clearly** in the PR description.
6. **Link related issues** if applicable.
7. PRs will be **reviewed**, feedback may be requested, and CI checks must pass before merging.

---

## ⚠️ Safety Considerations

* Avoid including API keys or sensitive data in commits.
* Test your changes with `--dry-run` when commands may affect files or system.
* Do **not** upload real user data during testing.

---

## 🀝 Code of Conduct

* Be respectful and constructive in discussions.
* Help maintain a positive community.
* Report abusive behavior to the maintainers.

---

72 changes: 72 additions & 0 deletions PRIVACY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Privacy & Data Use Policy for Grok CLI

_Last updated: November 2025_

The Grok CLI enables developers to interact with the Grok (X.AI) model directly from the terminal.
This document explains **what data may be sent**, **how it is handled**, and **how to stay safe**.

---

## πŸ” 1. Data Sent to Third Parties

When you use Grok CLI features that call the Grok or Morph APIs, the following information **may be transmitted**:

| Type | Purpose | Sent to |
|------|---------|---------|
| User prompts (your questions) | Provide model responses | Grok API |
| Optional project file snippets | Provide context for editing | Grok API |
| Edit diffs (optional) | For "Fast Apply" edits | Morph API |
| Error telemetry (opt-in) | Debug and improve CLI | Maintainers (optional) |

> By default, **file uploads are disabled**.
> You must explicitly opt-in to share code or context with `--allow-file-uploads` or in settings.

---

## βš™οΈ 2. Local Storage

Local configuration is stored at:
- `~/.grok/user-settings.json`
- `.grok/settings.json`
- `.env` (optional)

These files contain preferences and API keys. They are **never uploaded automatically**.

---

## πŸ›‘οΈ 3. API Keys

You must provide your own:
- `GROK_API_KEY`
- (Optional) `MORPH_API_KEY` (enables Fast Apply high-speed editing)

Keep them private.
Do **not** commit `.env` files or user-settings to Git. The repository `.gitignore` protects this by default.

---

## 🧩 4. Telemetry

Telemetry is **disabled by default**.
To enable anonymous usage metrics:

```bash
grok config telemetry true
````

To disable it again:

```bash
grok config telemetry false
```

---

## ⚠️ 5. Recommendations

* Review what data will be sent before confirming.
* Never include credentials, API keys, or internal-only code in prompts.
* Use `--never-send-files` in secure environments.
* Always use `--dry-run` before allowing command execution.

---
Loading