getaura 0.1.10 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/LICENSE +126 -0
  2. package/README.md +13 -4
  3. package/THIRD-PARTY-NOTICES.md +31 -0
  4. package/dist/index.js +12355 -2552
  5. package/dist/index.js.map +1 -1
  6. package/package.json +6 -3
  7. package/plugin/skills/{scan → check}/SKILL.md +3 -3
  8. package/plugin/skills/fix/SKILL.md +4 -2
  9. package/plugin/skills/next/SKILL.md +4 -2
  10. package/plugin/skills/pr/SKILL.md +18 -0
  11. package/plugin/skills/setup/SKILL.md +1 -1
  12. package/templates/LICENSE +16 -0
  13. package/templates/README.md +7 -3
  14. package/templates/github/workflows/aura-weekly.yml +2 -2
  15. package/templates/github/workflows/aura.yml +16 -8
  16. package/templates/github/workflows/ci.yml +2 -2
  17. package/templates/guides/add-aura-key-to-github.md +4 -4
  18. package/templates/guides/ai-spend-limits.md +50 -0
  19. package/templates/guides/database-backups.md +61 -0
  20. package/templates/guides/github-security.md +2 -2
  21. package/templates/guides/install-github-cli.md +1 -1
  22. package/templates/guides/rotate-generic-key.md +1 -1
  23. package/templates/guides/sync-migrations.md +88 -0
  24. package/templates/guides/sync-vercel-env.md +56 -0
  25. package/templates/nextjs/error.tsx +23 -0
  26. package/templates/nextjs/global-error.tsx +27 -0
  27. package/templates/nextjs/not-found.tsx +15 -0
  28. package/templates/pr/add-error-pages.md +23 -0
  29. package/templates/pr/protect-agent-secrets.md +18 -0
  30. package/templates/rules/agent-rules.md +6 -1
  31. package/templates/skills/aura/SKILL.md +28 -8
  32. package/templates/skills/error-handling/SKILL.md +2 -0
  33. package/templates/skills/folder-structure/SKILL.md +2 -1
  34. package/templates/skills/pre-launch-checklist/SKILL.md +2 -2
  35. package/templates/skills/secrets-and-env/SKILL.md +1 -1
  36. package/templates/skills/secure-api-routes/SKILL.md +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "getaura",
3
- "version": "0.1.10",
3
+ "version": "0.4.0",
4
4
  "description": "Aura helps you and your coding agent follow best practices while you vibe code.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -11,12 +11,14 @@
11
11
  "templates",
12
12
  "README.md",
13
13
  ".claude-plugin",
14
- "plugin"
14
+ "plugin",
15
+ "LICENSE",
16
+ "THIRD-PARTY-NOTICES.md"
15
17
  ],
16
18
  "engines": {
17
19
  "node": ">=22"
18
20
  },
19
- "license": "UNLICENSED",
21
+ "license": "FSL-1.1-MIT AND MIT-0",
20
22
  "repository": {
21
23
  "type": "git",
22
24
  "url": "git+https://github.com/JohnFazio1/aura.git"
@@ -44,6 +46,7 @@
44
46
  "yaml": "^2.9.1"
45
47
  },
46
48
  "devDependencies": {
49
+ "@getaura/rules": "workspace:*",
47
50
  "@getaura/shared": "workspace:*",
48
51
  "@types/node": "^26.6.5",
49
52
  "tsup": "^8.5.1",
@@ -1,15 +1,15 @@
1
1
  ---
2
- name: scan
2
+ name: check
3
3
  description: Check this repo's Aura score and explain what Aura found, in plain language.
4
4
  disable-model-invocation: true
5
5
  allowed-tools: Bash
6
6
  ---
7
7
 
8
- Run `aura scan --json` from the repository root. If `aura` isn't found, run `npx getaura scan --json` instead.
8
+ Run `aura check --json` from the repository root. If `aura` isn't found, run `npx getaura check --json` instead.
9
9
 
10
10
  Then tell the user, in plain language for a non-technical founder:
11
11
 
12
- 1. The Aura score (0–100) and its label, and the score for each category.
12
+ 1. The Aura score (0–100) and its label, and the score for each category, and what Aura scored the repo as (`profile.projects`). If a project's `confidence` is `low`, ask the user whether that's right; if they say no, run `aura config kind <kind> [folder]` with the kind they describe and check again.
13
13
  2. The most serious findings first: what could happen to the business or its users, not just the technical term. Group the rest instead of listing everything.
14
14
  3. One clear recommendation for what to do next, and offer to do it (`/aura:fix`).
15
15
 
@@ -13,8 +13,10 @@ If the user named nothing to fix, run `aura next --json` (or `npx getaura next -
13
13
  Follow the step's `delivery`:
14
14
 
15
15
  - `pr`: run `aura apply <action> --yes`. Tell the user a pull request was opened and what to check before merging.
16
- - `agent-fix`: run `aura fix <action> --yes` to have Aura's agent make the change in a pull request. If that fails because there's no pilot key, run `aura fix <action> --agent` and complete the task file it writes yourself: on a new branch `aura/<id>`, keep the change small, run the tests, lint and type check, then open a pull request with `gh pr create` and a plain-language description.
16
+ - `agent-fix`: run `aura fix <action> --yes` to have Aura's agent make the change in a pull request. If Aura's agent isn't available (for example, the key's monthly agent budget is used up), run `aura fix <action> --agent` and complete the task file it writes yourself: on a new branch `aura/<id>`, keep the change small, run the tests, lint and type check, then open a pull request with `gh pr create` and a plain-language description.
17
17
  - `guide`: run `aura guide <topic>` and walk the user through it step by step. These are things they do in a dashboard, not in the code.
18
18
  - `checklist`: run `aura inventory --json`, show the user which services and accounts Aura found, and ask them to run `aura inventory` in their own terminal to record who owns each account.
19
19
 
20
- Afterwards, run `aura scan --json` and tell the user the new score. Never disable, weaken or ignore a check to raise the score, and never repeat a secret value.
20
+ Large changes need the user's approval first. If `aura fix` or `aura apply` stops with exit code 3 and says the change is large, show the user the breakdown it printed (also saved in `.aura/plans/<action>.md`) in plain words: what will change, why, what won't change, the risk and the chunks. Ask whether to go ahead. Only after they clearly say yes, run the same command again with `--approved` added; `--yes` doesn't count as their approval. Each run does one chunk in one pull request: tell the user which chunk was opened and how many are left, and run the command with `--approved` again for the next chunk when they want to continue.
21
+
22
+ Afterwards, run `aura check --json` and tell the user the new score. Never disable, weaken or ignore a check to raise the score, and never repeat a secret value.
@@ -12,8 +12,10 @@ Show the steps as a short numbered list, most important first. For each: the tit
12
12
  Ask the user which ones they want done. For each one they choose, follow its `delivery`:
13
13
 
14
14
  - `pr`: run `aura apply <action id> --yes` and tell the user what to check in the pull request.
15
- - `agent-fix`: run `aura fix <action id> --yes` (without a pilot key, `aura fix <action id> --agent`, then complete the task file it writes).
15
+ - `agent-fix`: run `aura fix <action id> --yes` (if Aura's agent isn't available, `aura fix <action id> --agent`, then complete the task file it writes).
16
16
  - `guide`: run `aura guide <topic>` and walk the user through it.
17
17
  - `checklist`: run `aura inventory --json`, show the user which services and accounts Aura found, and ask them to run `aura inventory` in their own terminal to record who owns each account.
18
18
 
19
- Afterwards, run `aura scan --json` and tell the user the new score.
19
+ If a command stops with exit code 3 because the change is large, show the user the breakdown it printed (also in `.aura/plans/<action>.md`) in plain words and ask whether to go ahead. Only after they clearly say yes, run it again with `--approved` (`--yes` doesn't count). Each run does one chunk in one pull request; tell the user how many chunks are left.
20
+
21
+ Afterwards, run `aura check --json` and tell the user the new score.
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: pr
3
+ description: Wrap up the session: turn the uncommitted work into focused pull requests that follow good practice.
4
+ disable-model-invocation: true
5
+ allowed-tools: Bash
6
+ ---
7
+
8
+ Run `aura pr --dry-run --json` from the repository root. If `aura` isn't found, run `npx getaura pr --dry-run --json` instead.
9
+
10
+ It returns the pull requests Aura would open, in the order to merge them. Each has an `id`, `title`, `why` (why it's a pull request of its own), `files`, `lines`, `large` and `heldBack` (files that contain a secret). `leftOut` lists files that stay on the computer, and `blocker` says why nothing can be opened yet.
11
+
12
+ 1. If `blocker` is set, tell the user in plain words what to do first and stop.
13
+ 2. If a group has `heldBack` files, tell the user a secret was found (by file, never the value), move it into `.env.local` and read it with `process.env`, then run the dry run again.
14
+ 3. Write `.aura/tasks/pr-notes.json` with a note for each group you know about: `{ "<id>": { "title": "...", "summary": "...", "check": ["..."] } }`. The title says what changed in a few words. The summary explains, in plain language, what changed and why. `check` lists what the user should try before merging. Describe only work you did or can see in the files.
15
+ 4. Show the user the plan: one line per pull request with its title and file count, which ones are `large` (suggest splitting them by feature), and what's left out. Ask whether to open them.
16
+ 5. Only after they say yes, run `aura pr --yes --notes .aura/tasks/pr-notes.json`. To open only some, add `--only <id>,<id>`.
17
+
18
+ Then tell the user which pull requests were opened, the order to merge them, and to run `git pull` after merging. Never merge a pull request yourself.
@@ -9,7 +9,7 @@ Run `npx getaura@latest init --yes --agent claude` from the repository root and
9
9
 
10
10
  - **Sign-in link**: ask the user to open it and paste their pilot key in the browser. Never ask for the key in chat. If the command stops while waiting, run it again once they've finished: it carries on with the same link.
11
11
  - **Product brief questions**: suggest answers from the code and let the user confirm or correct them, save them as it describes, and run the command it gives.
12
- - **The `aura` command**: if it says to install it, run that command so the user can type `aura scan` from now on.
12
+ - **The `aura` command**: if it says to install it, run that command so the user can type `aura check` from now on.
13
13
 
14
14
  If a command fails because the network or writing outside the project is blocked (sandboxed agents such as Codex), ask the user to approve running it with network access. Aura needs the network for sign-in and npm, and writes its settings to `~/.aura`.
15
15
 
@@ -0,0 +1,16 @@
1
+ MIT No Attribution
2
+
3
+ Copyright 2026 John Fazio
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this
6
+ software and associated documentation files (the "Software"), to deal in the Software
7
+ without restriction, including without limitation the rights to use, copy, modify,
8
+ merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
9
+ permit persons to whom the Software is furnished to do so.
10
+
11
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
12
+ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
13
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
14
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
15
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
16
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,6 +1,6 @@
1
1
  # Aura templates
2
2
 
3
- Files the Aura CLI copies into a user's repository, usually through a pull request. Each file is plain text with `{{name}}` placeholders that the CLI fills in.
3
+ Files the Aura CLI copies into a user's repository, usually through a pull request. Each file is plain text with `{{name}}` placeholders that the CLI fills in. They're licensed to users under MIT-0 (`LICENSE` here, which is not itself copied), so users own their copies outright.
4
4
 
5
5
  ## Placeholder rules
6
6
 
@@ -79,6 +79,10 @@ Agent Skills format: YAML frontmatter with `name` (matches the folder) and `desc
79
79
  | `security-headers.md` | Not copied. Snippet the CLI or agent merges into `next.config` | `add-security-headers` |
80
80
  | `env-example-header.txt` | Top of `.env.example` | `add-env-example` |
81
81
 
82
+ ### Next.js pages (`nextjs/`)
83
+
84
+ `error.tsx`, `global-error.tsx` and `not-found.tsx` → the app's `app/` (or `src/app/`) folder (`add-error-pages`), only when that page doesn't exist yet. No `{{placeholders}}`: the generator replaces each ` className="aura-page|title|text|button|link"` marker with Tailwind classes (theme colours such as `bg-primary` when the app defines shadcn/ui-style tokens), or with inline layout styles (never colours) when the app has no Tailwind, and drops the `Props` type for `.jsx`. `global-error.tsx` keeps inline styles because the app's stylesheet isn't loaded there.
85
+
82
86
  ### Guides (`guides/<topic>.md`)
83
87
 
84
88
  Printed by `aura guide <topic>`. Frontmatter: `title`, `summary` (one sentence), `services` (array). Body: numbered steps and a "Check it worked" section.
@@ -89,6 +93,6 @@ Mapping from secret service ids to guides: `github` → `rotate-github-token`; `
89
93
 
90
94
  ### PR bodies (`pr/<action>.md`)
91
95
 
92
- One per PR action id: `add-brief`, `add-agent-rules`, `install-skills`, `token-efficiency`, `add-ci`, `setup-testing`, `add-env-example`, `add-linting`, `add-pre-commit`, `add-readme`, `enable-dependency-updates`, `fix-vulnerable-deps`, `add-security-headers`, `remove-dead-files`, `move-misplaced-files`, `add-aura-workflow`, `foundation`.
96
+ One per PR action id: `add-brief`, `add-agent-rules`, `install-skills`, `token-efficiency`, `add-ci`, `setup-testing`, `add-env-example`, `add-linting`, `add-pre-commit`, `add-readme`, `enable-dependency-updates`, `fix-vulnerable-deps`, `add-security-headers`, `remove-dead-files`, `move-misplaced-files`, `add-aura-workflow`, `add-error-pages`, `foundation`.
93
97
 
94
- Sections: "What this does", "Why it matters", "What to check before merging", then the footer `Opened by [Aura](https://github.com/JohnFazio1/aura) · {{aura_version}}`. The PR title is set by the CLI. `{{details}}` appears in `install-skills`, `token-efficiency`, `setup-testing`, `add-env-example`, `fix-vulnerable-deps`, `remove-dead-files`, `move-misplaced-files` and `foundation`.
98
+ Sections: "What this does", "Why it matters", "What to check before merging", then the footer `Opened by [Aura](https://github.com/JohnFazio1/aura) · {{aura_version}}`. The PR title is set by the CLI. `{{details}}` appears in `install-skills`, `token-efficiency`, `setup-testing`, `add-env-example`, `fix-vulnerable-deps`, `remove-dead-files`, `move-misplaced-files`, `add-error-pages` and `foundation`.
@@ -32,13 +32,13 @@ jobs:
32
32
 
33
33
  - name: Set up pnpm
34
34
  if: hashFiles('pnpm-lock.yaml') != ''
35
- uses: pnpm/action-setup@v4
35
+ uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0
36
36
  with:
37
37
  version: ${{ steps.pnpm.outputs.version }}
38
38
 
39
39
  - name: Set up Bun
40
40
  if: hashFiles('bun.lock', 'bun.lockb') != ''
41
- uses: oven-sh/setup-bun@v2
41
+ uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
42
42
 
43
43
  - uses: actions/setup-node@v5
44
44
  with:
@@ -3,8 +3,9 @@
3
3
  # the allowed amount (ciMaxDrop in .aura/config.json, default 0; loosen it with
4
4
  # `aura config ciMaxDrop 3`). Aura's version is pinned so scores only change when
5
5
  # your code does; upgrade it deliberately by re-running `aura apply add-aura-workflow`.
6
- # Needs the AURA_PILOT_KEY repository secret for plain-language explanations
7
- # (run `aura guide add-aura-key-to-github`). It still scores without it.
6
+ # Needs your Aura pilot key as the AURA_PILOT_KEY repository secret (run
7
+ # `aura guide add-aura-key-to-github`); without it the check fails. Pull requests
8
+ # from forks and Dependabot get no repository secrets, so Aura skips them.
8
9
  name: Aura score
9
10
 
10
11
  on:
@@ -37,13 +38,13 @@ jobs:
37
38
 
38
39
  - name: Set up pnpm
39
40
  if: hashFiles('pnpm-lock.yaml') != ''
40
- uses: pnpm/action-setup@v4
41
+ uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0
41
42
  with:
42
43
  version: ${{ steps.pnpm.outputs.version }}
43
44
 
44
45
  - name: Set up Bun
45
46
  if: hashFiles('bun.lock', 'bun.lockb') != ''
46
- uses: oven-sh/setup-bun@v2
47
+ uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
47
48
 
48
49
  - uses: actions/setup-node@v5
49
50
  with:
@@ -55,12 +56,19 @@ jobs:
55
56
 
56
57
  - name: Run Aura scan (pull request)
57
58
  id: scan
58
- if: github.event_name == 'pull_request'
59
+ if: >-
60
+ github.event_name == 'pull_request'
61
+ && github.event.pull_request.head.repo.full_name == github.repository
62
+ && github.actor != 'dependabot[bot]'
59
63
  continue-on-error: true
60
64
  env:
61
65
  AURA_KEY: ${{ secrets.AURA_PILOT_KEY }}
62
66
  BASE_REF: ${{ github.base_ref }}
63
- run: npx --yes getaura@{{aura_version}} scan --ci --base "origin/$BASE_REF" --comment-file aura-comment.md
67
+ run: npx --yes getaura@{{aura_version}} check --ci --base "origin/$BASE_REF" --comment-file aura-comment.md
68
+
69
+ - name: Skip Aura on forks and Dependabot
70
+ if: steps.scan.outcome == 'skipped' && github.event_name == 'pull_request'
71
+ run: echo "Aura skipped this pull request because it comes from a fork or Dependabot, which get no repository secrets."
64
72
 
65
73
  - name: Post Aura comment
66
74
  # Runs even when the scan failed. Skipped for forks and Dependabot,
@@ -80,11 +88,11 @@ jobs:
80
88
  - name: Fail if the score dropped
81
89
  if: github.event_name == 'pull_request' && steps.scan.outcome == 'failure'
82
90
  run: |
83
- echo "The Aura score dropped more than allowed, or the scan failed. See the comment on the pull request."
91
+ echo "The Aura score dropped more than allowed, or the scan failed. See the comment on the pull request, or the log of the Aura scan step."
84
92
  exit 1
85
93
 
86
94
  - name: Run Aura scan (main)
87
95
  if: github.event_name == 'push'
88
96
  env:
89
97
  AURA_KEY: ${{ secrets.AURA_PILOT_KEY }}
90
- run: npx --yes getaura@{{aura_version}} scan --ci
98
+ run: npx --yes getaura@{{aura_version}} check --ci
@@ -32,13 +32,13 @@ jobs:
32
32
 
33
33
  - name: Set up pnpm
34
34
  if: hashFiles('pnpm-lock.yaml') != ''
35
- uses: pnpm/action-setup@v4
35
+ uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0
36
36
  with:
37
37
  version: ${{ steps.pnpm.outputs.version }}
38
38
 
39
39
  - name: Set up Bun
40
40
  if: hashFiles('bun.lock', 'bun.lockb') != ''
41
- uses: oven-sh/setup-bun@v2
41
+ uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
42
42
 
43
43
  - uses: actions/setup-node@v5
44
44
  with:
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  title: Add your Aura key to GitHub
3
- summary: Store your Aura pilot key as a GitHub Actions secret so pull request checks include plain-language explanations.
3
+ summary: Store your Aura pilot key as a GitHub Actions secret so Aura can check every pull request.
4
4
  services: [github, aura]
5
5
  ---
6
6
 
7
7
  # Add your Aura key to GitHub
8
8
 
9
- The Aura workflow scores every pull request. With your pilot key stored as a repository secret, its comments also include plain-language explanations. The key is stored encrypted and never shown in logs.
9
+ The Aura workflow scores every pull request, and like every Aura command it needs your pilot key. Store it as a repository secret: GitHub keeps it encrypted and never shows it in logs. Without it, the Aura check fails.
10
10
 
11
11
  ## Option 1: in the browser
12
12
 
@@ -29,6 +29,6 @@ Paste the key when asked and press Enter. Don't put the key in the command itsel
29
29
  ## Check it worked
30
30
 
31
31
  - **Settings → Secrets and variables → Actions** lists `AURA_PILOT_KEY` (the value stays hidden), or `gh secret list` shows it.
32
- - Open or update a pull request. The **Aura score** comment includes explanations.
32
+ - Open or update a pull request. The **Aura score** check passes and posts its comment.
33
33
 
34
- Pull requests from Dependabot and from forks can't read repository secrets or post comments. The Aura check still runs on them, without a comment. That's expected.
34
+ Pull requests from Dependabot and from forks can't read repository secrets, so Aura skips them. That's expected.
@@ -0,0 +1,50 @@
1
+ ---
2
+ title: Set spending caps for your AI providers
3
+ summary: Set a monthly budget and usage alerts with OpenAI, Anthropic and Vercel AI Gateway, and revoke AI keys you don't use.
4
+ services: [openai, anthropic, vercel]
5
+ ---
6
+
7
+ # Set spending caps for your AI providers
8
+
9
+ Every AI call costs money. A bug that calls the model in a loop, a public page someone abuses, or a leaked key can run up a large bill overnight. A monthly budget and an email alert with each provider limit the damage, even if something in the app goes wrong. This takes about fifteen minutes and needs the login that owns billing for each account.
10
+
11
+ Only do the sections for the providers your app uses. If you're not sure, look at the environment variables in your hosting settings: names like `OPENAI_API_KEY`, `ANTHROPIC_API_KEY` or `AI_GATEWAY_API_KEY` tell you which ones.
12
+
13
+ ## Before you start
14
+
15
+ 1. Look at what you spent last month on each provider's usage or billing page, so you can pick a budget with some room above it.
16
+ 2. Decide who should get the alert emails. A shared company inbox is better than one person's email.
17
+
18
+ ## OpenAI
19
+
20
+ 1. Sign in at https://platform.openai.com and open **Settings**.
21
+ 2. Open **Limits** (it may be under Billing). Set a monthly budget, and set an email alert at a lower amount, for example half the budget.
22
+ 3. Read the wording next to the budget. Some budgets only send an email and don't stop requests; if so, the alert is your warning to act.
23
+ 4. If you use projects, each project can have its own budget in its settings. Give the project your app uses its own limit.
24
+
25
+ ## Anthropic
26
+
27
+ 1. Sign in to the Anthropic Console (https://console.anthropic.com) and open **Settings**.
28
+ 2. Open **Limits**. Set a monthly spend limit, and turn on email notifications at a lower amount.
29
+ 3. If your organization has several workspaces, check whether the workspace your app uses has its own limit and set one.
30
+
31
+ ## Vercel AI Gateway
32
+
33
+ 1. In the Vercel dashboard, open your team and then the **AI Gateway** page.
34
+ 2. Check how the gateway is paid for. If it tops up credits automatically, decide whether to turn that off or lower the top-up amount, so spending stops at an amount you chose.
35
+ 3. Look at the usage page to see which models and projects are spending, and check that it matches what you expect.
36
+
37
+ ## Check which keys exist
38
+
39
+ Keys you don't use are risk with no benefit. Do this for each provider:
40
+
41
+ 1. Open the API keys page (OpenAI: https://platform.openai.com/api-keys; Anthropic: **Settings → API keys** in the Console; Vercel AI Gateway: the keys section of the AI Gateway page).
42
+ 2. Compare the list with the keys your app uses in its hosting settings and in GitHub Actions secrets.
43
+ 3. Revoke any key nobody can explain, any key for an old project, and any key that was ever pasted in a chat, email or code. If the page shows when a key was last used, a key unused for months is a good candidate.
44
+ 4. If you revoke a key the app still needs, the AI features stop working until you create a new key and put it in your hosting settings, so check twice before revoking.
45
+
46
+ ## Check it worked
47
+
48
+ - Each provider you use shows a monthly budget or spend limit and an alert amount.
49
+ - The API keys pages only list keys your app or your team actually uses.
50
+ - Run `aura check` to check that AI routes need a sign-in, are rate-limited and limit the length of each answer.
@@ -0,0 +1,61 @@
1
+ ---
2
+ title: Check your database backups
3
+ summary: Where Supabase keeps your database backups, how to download one before a risky change, and what point-in-time recovery is.
4
+ services: [supabase]
5
+ ---
6
+
7
+ # Check your database backups
8
+
9
+ A backup is a copy of your database you can go back to if a migration goes wrong, a bug deletes data, or someone makes a mistake. Without one, lost data is gone for good. This takes about ten minutes.
10
+
11
+ Aura only reads your backup status. It never creates, restores or deletes backups, and never changes your plan.
12
+
13
+ ## Where your backups are
14
+
15
+ 1. Sign in at https://supabase.com/dashboard and open your project.
16
+ 2. Open **Database**, then **Backups**.
17
+ 3. You'll see the list of daily backups and when each was taken, or the point-in-time recovery settings if that's on.
18
+
19
+ Paid Supabase plans take a backup every day and keep them for a number of days that depends on the plan. The Free plan has no automatic backups, so on Free the only backups are the ones you download yourself (see below).
20
+
21
+ If you're on a paid plan and the list is empty, or the newest backup is more than a few days old, contact Supabase support from the dashboard (**Help** or **Support**): daily backups should run on their own.
22
+
23
+ ## Download a backup before a risky change
24
+
25
+ Before a big migration, a data clean-up or anything that deletes data, keep your own copy.
26
+
27
+ On a paid plan, the **Backups** page lets you download a daily backup.
28
+
29
+ You can also save a copy with the Supabase CLI on any plan. It needs Docker Desktop running. Run these from your project folder, one line at a time (they work in PowerShell, Command Prompt, Git Bash and macOS or Linux terminals):
30
+
31
+ ```
32
+ npx supabase db dump --linked -f "../db-backup-roles.sql" --role-only
33
+ ```
34
+
35
+ ```
36
+ npx supabase db dump --linked -f "../db-backup-schema.sql"
37
+ ```
38
+
39
+ ```
40
+ npx supabase db dump --linked -f "../db-backup-data.sql" --data-only --use-copy
41
+ ```
42
+
43
+ This saves three files in the folder above your project, so they can't be committed by mistake. The data file holds your users' data: keep it somewhere private, never commit it to git, and never paste it into a chat. Delete it once you no longer need it.
44
+
45
+ ## Point-in-time recovery
46
+
47
+ Point-in-time recovery (PITR) backs up the database continuously, so you can restore it to any second instead of to last night's backup. That matters when losing a day of orders or sign-ups would hurt.
48
+
49
+ - It's a paid add-on on paid plans, and it costs extra every month, so whether it's worth it is your decision. Aura only mentions it; it never counts against your score.
50
+ - While it's on, Supabase stops taking daily backups, because PITR covers them.
51
+ - You turn it on in the dashboard under **Database → Backups** (or the project's add-ons).
52
+
53
+ ## Check it worked
54
+
55
+ - **Database → Backups** shows a backup from the last day or two, or point-in-time recovery is on.
56
+ - Before your next risky change, you have a downloaded copy in a private place.
57
+ - Aura reads backups at most once a day. To read them again now (this only reads, nothing is changed), run:
58
+
59
+ ```
60
+ aura apply supabase-security --dry-run
61
+ ```
@@ -8,7 +8,7 @@ services: [github]
8
8
 
9
9
  These settings stop broken or unsafe code from reaching `main`, catch secrets before they're pushed, and warn you about vulnerable packages. They take about ten minutes. You need admin access to the repository.
10
10
 
11
- **Aura can do steps 1 to 4 for you**: run `aura apply github-security` (or pick "Turn on GitHub security features" after `aura scan`). It turns on everything your plan allows and tells you what's left. Use the steps below to do it by hand.
11
+ **Aura can do steps 1 to 4 for you**: run `aura apply github-security` (or pick "Turn on GitHub security features" after `aura check`). It turns on everything your plan allows and tells you what's left. Use the steps below to do it by hand.
12
12
 
13
13
  Some features on private repositories need a paid GitHub plan. Where that applies, it's noted below.
14
14
 
@@ -62,4 +62,4 @@ Available on public repositories.
62
62
 
63
63
  - Try pushing directly to `main` (`git push origin main` with a small change). GitHub rejects it.
64
64
  - **Settings → Advanced Security** shows secret scanning, push protection, Dependabot alerts and security updates as enabled (where your plan allows).
65
- - Run `aura scan`; the GitHub settings findings are gone.
65
+ - Run `aura check`; the GitHub settings findings are gone.
@@ -47,4 +47,4 @@ Run:
47
47
  gh auth status
48
48
  ```
49
49
 
50
- It shows "Logged in to github.com" with your username. Then run `aura scan` again.
50
+ It shows "Logged in to github.com" with your username. Then run `aura check` again.
@@ -30,7 +30,7 @@ For a private key (`-----BEGIN PRIVATE KEY-----`), generate a new key pair where
30
30
 
31
31
  - The old key no longer appears in the service's dashboard, or shows as revoked.
32
32
  - The feature that uses it works in your live app.
33
- - Run `aura scan` to confirm Aura no longer finds the secret in your code.
33
+ - Run `aura check` to confirm Aura no longer finds the secret in your code.
34
34
 
35
35
  ## About git history
36
36
 
@@ -0,0 +1,88 @@
1
+ ---
2
+ title: Bring the live database and the migrations back in step
3
+ summary: Review how the live Supabase database differs from supabase/migrations, apply pending migrations yourself, and pull changes made by hand into a new migration.
4
+ services: [supabase]
5
+ ---
6
+
7
+ # Bring the live database and the migrations back in step
8
+
9
+ The files in `supabase/migrations/` are meant to describe your live database exactly: every table, column and row-level security policy. Aura found a difference. Either the repo has migrations the live database hasn't run yet (so the app may expect tables or security rules that don't exist), or the live database has changes that aren't in the repo (so nobody can rebuild it, and other environments drift apart). The versions are listed in the findings: run `aura check` to see them.
10
+
11
+ Aura only reads your database. It never applies, changes or repairs migrations for you: you run each command below yourself, once you're sure. Run the commands from your project folder, one line at a time. They work the same in PowerShell, Command Prompt, Git Bash and macOS or Linux terminals.
12
+
13
+ ## Before you start
14
+
15
+ 1. Take a backup first. Follow `aura guide database-backups` (it shows how to download one), so you can go back if something goes wrong.
16
+ 2. Sign in to the Supabase CLI and check this folder is linked to the right project (the live one, not a test project):
17
+
18
+ ```
19
+ npx supabase login
20
+ ```
21
+
22
+ ```
23
+ npx supabase projects list
24
+ ```
25
+
26
+ The linked project has a dot or tick next to it. If it's the wrong one, run `npx supabase link` and pick the right project.
27
+
28
+ ## 1. Review the difference
29
+
30
+ ```
31
+ npx supabase migration list --linked
32
+ ```
33
+
34
+ This prints two columns. **Local** is the files in `supabase/migrations/`; **Remote** is what the live database has run. A version in Local with an empty Remote is waiting to be applied. A version in Remote with an empty Local was applied to the database but has no file in the repo.
35
+
36
+ Open each waiting file (`supabase/migrations/<version>_<name>.sql`) and read what it does. Ask your coding agent to explain it in plain words if it helps. Look out for anything that deletes tables, columns or rows.
37
+
38
+ ## 2. Apply migrations that are waiting
39
+
40
+ Once you're sure the waiting migrations are right, first see exactly what would run, without changing anything:
41
+
42
+ ```
43
+ npx supabase db push --dry-run
44
+ ```
45
+
46
+ Then apply them to the live database:
47
+
48
+ ```
49
+ npx supabase db push
50
+ ```
51
+
52
+ This changes your live database, which is why Aura never runs it for you. If it says some migrations are older than the last one applied, check those files carefully, then run `npx supabase db push --include-all`.
53
+
54
+ ## 3. Bring changes made by hand into the repo
55
+
56
+ If the live database has migrations that aren't in the repo, first ask whoever made them. If they came from another branch, the simplest fix is to merge that branch, or copy its migration files into `supabase/migrations/` unchanged.
57
+
58
+ If the changes were made by hand (in the Supabase dashboard's table editor or SQL editor), capture them in a new migration file. This needs Docker Desktop running:
59
+
60
+ ```
61
+ npx supabase db pull
62
+ ```
63
+
64
+ It creates a new file in `supabase/migrations/` describing the live database's changes, and can record it as applied. If it says the migration history doesn't match, it prints `npx supabase migration repair …` commands. Those only change the list of applied migrations, not your tables or data, but only run them if you understand what they mark, then run `npx supabase db pull` again. Review the new file and commit it.
65
+
66
+ ## Never edit an applied migration
67
+
68
+ A migration the live database has already run is history: changing its file doesn't change the database, and it makes the repo describe something that never happened. To change a table or a policy, always write a new migration. Your coding agent's `database-migrations` skill explains how.
69
+
70
+ ## Check it worked
71
+
72
+ 1. Both columns match:
73
+
74
+ ```
75
+ npx supabase migration list --linked
76
+ ```
77
+
78
+ 2. Aura reads the live database at most once a day. To read it again now (this only reads, nothing is changed):
79
+
80
+ ```
81
+ aura apply supabase-security --dry-run
82
+ ```
83
+
84
+ 3. Then check your score:
85
+
86
+ ```
87
+ aura check
88
+ ```
@@ -0,0 +1,56 @@
1
+ ---
2
+ title: Add the missing environment variables in Vercel
3
+ summary: Set the environment variables your code uses in Vercel, for Production and Preview, without pasting secrets anywhere unsafe.
4
+ services: [vercel]
5
+ ---
6
+
7
+ # Add the missing environment variables in Vercel
8
+
9
+ Your code reads settings such as API keys and addresses from environment variables. On your computer they come from your `.env.local` file, but Vercel never sees that file: every variable the live site needs has to be added in Vercel too. A missing one can make a page crash or a feature quietly stop working, often only after you deploy.
10
+
11
+ `aura next` and `aura check` list the names that are missing. Aura only reads the names of your Vercel variables, never their values, and it never changes anything in Vercel, so you add them yourself. It takes a few minutes.
12
+
13
+ **Never paste a secret value into a chat with your coding agent, an issue, a pull request or a commit.** Type or paste values only into the Vercel dashboard or the Vercel CLI prompt.
14
+
15
+ ## Find each value
16
+
17
+ 1. Open `.env.example` in your repo. Each line names a variable, and the comment above it usually says what it's for and where to get it (for example "Stripe dashboard → Developers → API keys").
18
+ 2. If you already run the app on your computer, the value is in your `.env.local` file. Use the live (production) key for Production and a test key for Preview where the service has one, such as Stripe's test keys.
19
+ 3. If you can't tell what a variable is for or where its value comes from, ask your coding agent to explain it from the code. Ask it to describe the variable, not to fill in the value.
20
+ 4. If the app works fine without a variable (it has a default, or it's only for local development or tests), you don't need to add it. Write "optional" in its comment in `.env.example`, for example `# Optional: requests per minute (default 60)`, and Aura stops listing it.
21
+
22
+ ## Add them in the Vercel dashboard
23
+
24
+ 1. Open your project at https://vercel.com, then **Settings → Environment Variables**.
25
+ 2. For each missing name, enter the name exactly as listed (capital letters and underscores matter) and its value.
26
+ 3. Tick the environments it's for: **Production** for the live site, **Preview** for pull request previews, and **Development** if you use `vercel env pull` or `vercel dev`. Most variables need all three.
27
+ 4. For keys and passwords, turn on **Sensitive** so nobody can read the value back later.
28
+ 5. Click **Save**.
29
+
30
+ ## Or add them with the Vercel CLI
31
+
32
+ Run these from the folder you linked with `vercel link`. Each command asks for the value, so it never ends up in your terminal history. Run one command per line, replacing `NAME` with the variable's name:
33
+
34
+ ```
35
+ vercel env add NAME production
36
+ vercel env add NAME preview
37
+ ```
38
+
39
+ When the preview command asks for a git branch, leave it empty so every preview gets the variable. To see the names you've set (values stay hidden), run:
40
+
41
+ ```
42
+ vercel env ls
43
+ ```
44
+
45
+ ## Make the live site use them
46
+
47
+ Vercel only applies new variables to new deployments. Push a commit, or open the latest deployment in the Vercel dashboard and choose **Redeploy**. Aura never deploys for you.
48
+
49
+ ## Clean up old variables
50
+
51
+ If Aura says some variables are set in Vercel but never used in the code, they may be left over from a feature you removed. Check with your team, then delete the ones nobody needs in **Settings → Environment Variables**. If one was a key, revoke it in the service's dashboard too.
52
+
53
+ ## Check it worked
54
+
55
+ 1. Run `aura apply vercel-security --dry-run` to read the names from Vercel again straight away. It only reads; it changes nothing.
56
+ 2. Run `aura check`. The environment variable check passes once every variable your code needs is set for Production and Preview.
@@ -0,0 +1,23 @@
1
+ "use client";
2
+
3
+ // Shown when something on a page breaks. Visitors never see the technical details:
4
+ // in production Next.js only sends the browser a short reference code (error.digest),
5
+ // which matches the full error in your server logs.
6
+
7
+ type Props = {
8
+ error: Error & { digest?: string };
9
+ reset: () => void;
10
+ };
11
+
12
+ export default function ErrorPage({ error, reset }: Props) {
13
+ return (
14
+ <main className="aura-page">
15
+ <h1 className="aura-title">Something went wrong</h1>
16
+ <p className="aura-text">Sorry, this page didn’t load. Please try again. If it keeps happening, come back in a few minutes.</p>
17
+ <button type="button" onClick={() => reset()} className="aura-button">
18
+ Try again
19
+ </button>
20
+ {error.digest ? <p className="aura-text">Reference: {error.digest}</p> : null}
21
+ </main>
22
+ );
23
+ }
@@ -0,0 +1,27 @@
1
+ "use client";
2
+
3
+ // Shown when the root layout itself breaks. It replaces the whole page, including <html>
4
+ // and <body>, so the app's stylesheet isn't loaded here: keep the styles inline and simple.
5
+ // Visitors never see the technical details, only a short reference code (error.digest).
6
+
7
+ type Props = {
8
+ error: Error & { digest?: string };
9
+ reset: () => void;
10
+ };
11
+
12
+ export default function GlobalError({ error, reset }: Props) {
13
+ return (
14
+ <html lang="en">
15
+ <body style={{ fontFamily: "system-ui, sans-serif", margin: 0 }}>
16
+ <main style={{ maxWidth: "32rem", margin: "0 auto", padding: "4rem 1rem", textAlign: "center", lineHeight: 1.5 }}>
17
+ <h1>Something went wrong</h1>
18
+ <p>Sorry, the app didn’t load. Please try again. If it keeps happening, come back in a few minutes.</p>
19
+ <button type="button" onClick={() => reset()} style={{ font: "inherit", padding: "0.5rem 1rem", cursor: "pointer" }}>
20
+ Try again
21
+ </button>
22
+ {error.digest ? <p>Reference: {error.digest}</p> : null}
23
+ </main>
24
+ </body>
25
+ </html>
26
+ );
27
+ }