Skip to content

Commit 51df5d9

Browse files
domenkozarclaude
andcommitted
docs: streamline getting started experience
Consolidate installation and quick start into a single guide, remove redundant installation page, and improve navigation flow. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 81d5818 commit 51df5d9

File tree

5 files changed

+104
-135
lines changed

5 files changed

+104
-135
lines changed

docs/astro.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export default defineConfig({
1717
label: 'Getting Started',
1818
items: [
1919
{ label: 'Quick Start', slug: 'quick-start' },
20-
{ label: 'Installation', slug: 'installation' },
2120
],
2221
},
2322
{

docs/src/content/docs/index.mdx

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ hero:
88
file: ../../assets/houston.webp
99
actions:
1010
- text: Get Started
11-
link: /introduction/
11+
link: /quick-start/
1212
icon: right-arrow
1313
variant: primary
1414
- text: View on GitHub
@@ -33,18 +33,18 @@ This coupling creates vendor lock-in, runtime failures, poor developer experienc
3333
SecretSpec separates these concerns:
3434

3535
<CardGrid>
36-
<LinkCard
37-
title="WHAT secrets are needed"
36+
<LinkCard
37+
title="WHAT secrets are needed"
3838
href="/reference/configuration/"
3939
description="Declared in secretspec.toml"
4040
/>
41-
<LinkCard
42-
title="HOW requirements vary"
41+
<LinkCard
42+
title="HOW requirements vary"
4343
href="/concepts/profiles/"
4444
description="Managed through profiles"
4545
/>
46-
<LinkCard
47-
title="WHERE secrets are stored"
46+
<LinkCard
47+
title="WHERE secrets are stored"
4848
href="/concepts/providers/"
4949
description="Configured via providers"
5050
/>
@@ -55,33 +55,33 @@ This separation enables portable applications, early validation, better tooling,
5555
## Features
5656

5757
<CardGrid>
58-
<LinkCard
59-
title="Configuration Inheritance"
58+
<LinkCard
59+
title="Configuration Inheritance"
6060
href="/concepts/inheritance/"
6161
description="Share common secrets across projects using extends"
6262
/>
63-
<LinkCard
64-
title="Type-Safe Rust SDK"
63+
<LinkCard
64+
title="Type-Safe Rust SDK"
6565
href="/sdk/rust/"
6666
description="Generate strongly-typed structs from your configuration"
6767
/>
68-
<LinkCard
69-
title="Smart Discovery"
68+
<LinkCard
69+
title="Smart Discovery"
7070
href="/quick-start/"
7171
description="Import existing secrets from .env files automatically"
7272
/>
73-
<LinkCard
74-
title="CLI Tools"
73+
<LinkCard
74+
title="CLI Tools"
7575
href="/reference/cli/"
7676
description="Check, set, and run commands with secrets injected"
7777
/>
78-
<LinkCard
79-
title="Multiple Providers"
78+
<LinkCard
79+
title="Multiple Providers"
8080
href="/concepts/providers/"
8181
description="Support for Keyring, dotenv, 1Password, LastPass, and more"
8282
/>
83-
<LinkCard
84-
title="Early Validation"
83+
<LinkCard
84+
title="Early Validation"
8585
href="/concepts/overview/"
8686
description="Catch missing secrets before your application starts"
8787
/>

docs/src/content/docs/installation.md

Lines changed: 0 additions & 62 deletions
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,45 @@ title: Quick Start
33
description: Get up and running with SecretSpec in minutes
44
---
55

6+
import { Tabs, TabItem } from '@astrojs/starlight/components';
7+
8+
## Installation
9+
10+
Choose your preferred installation method:
11+
12+
<Tabs>
13+
<TabItem label="Static Binary">
14+
15+
```bash
16+
curl -sSL https://secretspec.dev/install | sh
17+
```
18+
19+
</TabItem>
20+
<TabItem label="Devenv.sh">
21+
22+
Add to your `devenv.nix`:
23+
24+
```nix
25+
{ config, ... }:
26+
{
27+
# Secrets are automatically populated from secretspec.toml
28+
env.DATABASE_URL = config.secretspec.secrets.DATABASE_URL;
29+
env.REDIS_URL = config.secretspec.secrets.REDIS_URL;
30+
}
31+
```
32+
33+
</TabItem>
34+
<TabItem label="Nix">
35+
36+
```bash
37+
nix-env -iA secretspec -f https://github.com/NixOS/nixpkgs/tarball/nixpkgs-unstable
38+
```
39+
40+
</TabItem>
41+
</Tabs>
42+
43+
## Getting Started
44+
645
Follow these steps to get started with SecretSpec:
746

847
## 1. Initialize `secretspec.toml`
Lines changed: 46 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,84 @@
11
---
2-
title: Configuration Reference
3-
description: Complete reference for secretspec.toml configuration
2+
title: secretspec.toml Reference
3+
description: Complete reference for secretspec.toml configuration options
44
---
55

6-
SecretSpec uses two configuration files:
7-
- **`secretspec.toml`** - Project-specific secret requirements (checked into version control)
8-
- **`config.toml`** - Global user configuration (stored in user config directory)
6+
## secretspec.toml Reference
97

10-
## secretspec.toml Format
8+
The `secretspec.toml` file defines project-specific secret requirements. This file should be checked into version control.
9+
10+
### [project] Section
1111

1212
```toml
1313
[project]
1414
name = "my-app" # Project name (required)
1515
revision = "1.0" # Format version (required, must be "1.0")
16-
extends = ["../shared"] # Optional inheritance
17-
18-
[profiles.default] # Default profile (required)
19-
DATABASE_URL = { description = "PostgreSQL connection", required = true }
20-
API_KEY = { description = "External API key", required = true }
21-
REDIS_URL = { description = "Redis cache", required = false, default = "redis://localhost:6379" }
16+
extends = ["../shared"] # Paths to parent configs for inheritance (optional)
2217
```
2318

24-
### Key Fields
25-
26-
| Section | Field | Type | Required | Description |
27-
|---------|-------|------|----------|-------------|
28-
| `[project]` | `name` | string | Yes | Project identifier |
29-
| | `revision` | string | Yes | Must be "1.0" |
30-
| | `extends` | array | No | Paths to parent configs |
31-
| `[profiles.*]` | `description` | string | Yes | Secret purpose |
32-
| | `required` | boolean | Yes* | Is value required? |
33-
| | `default` | string | No** | Fallback value |
19+
| Field | Type | Required | Description |
20+
|-------|------|----------|-------------|
21+
| `name` | string | Yes | Project identifier |
22+
| `revision` | string | Yes | Format version (must be "1.0") |
23+
| `extends` | array[string] | No | Paths to parent configuration files |
3424

35-
*Unless `default` is provided
36-
**Only when `required = false`
25+
### [profiles.*] Section
3726

38-
## Global Configuration
39-
40-
Located at:
41-
- **Linux/macOS**: `~/.config/secretspec/config.toml`
42-
- **Windows**: `%APPDATA%\secretspec\config.toml`
27+
Defines secret variables for different environments. At least a `[profiles.default]` section is required.
4328

4429
```toml
45-
[defaults]
46-
provider = "keyring" # Default provider
47-
profile = "development" # Default profile
30+
[profiles.default] # Default profile (required)
31+
DATABASE_URL = { description = "PostgreSQL connection", required = true }
32+
API_KEY = { description = "External API key", required = true }
33+
REDIS_URL = { description = "Redis cache", required = false, default = "redis://localhost:6379" }
4834

49-
[projects.my-app]
50-
provider = "1password://vault/Production"
35+
[profiles.production] # Additional profile (optional)
36+
DATABASE_URL = { description = "Production database", required = true }
5137
```
5238

53-
### Provider URIs
39+
#### Secret Variable Options
40+
41+
Each secret variable is defined as a table with the following fields:
42+
43+
| Field | Type | Required | Description |
44+
|-------|------|----------|-------------|
45+
| `description` | string | Yes | Human-readable description of the secret |
46+
| `required` | boolean | No* | Whether the value must be provided (default: true) |
47+
| `default` | string | No** | Default value if not provided |
5448

55-
| Provider | Simple | URI Examples |
56-
|----------|--------|--------------|
57-
| Keyring | `keyring` | `keyring:` |
58-
| 1Password | `1password` | `1password://vault`<br>`1password://vault/Production` |
59-
| Dotenv | `dotenv` | `dotenv:`<br>`dotenv:/path/to/.env` |
60-
| Env | `env` | `env:` |
61-
| LastPass | `lastpass` | `lastpass://folder` |
49+
*If `default` is provided, `required` defaults to false
50+
**Only valid when `required = false`
6251

63-
## Practical Example
52+
## Complete Example
6453

6554
```toml
6655
# secretspec.toml
6756
[project]
6857
name = "web-api"
6958
revision = "1.0"
59+
extends = ["../shared/secretspec.toml"] # Optional inheritance
7060

61+
# Default profile - always loaded first
7162
[profiles.default]
7263
APP_NAME = { description = "Application name", required = false, default = "MyApp" }
7364
LOG_LEVEL = { description = "Log verbosity", required = false, default = "info" }
7465

66+
# Development profile - extends default
7567
[profiles.development]
76-
DATABASE_URL = { description = "Database", required = false, default = "sqlite://./dev.db" }
68+
DATABASE_URL = { description = "Database connection", required = false, default = "sqlite://./dev.db" }
7769
API_URL = { description = "API endpoint", required = false, default = "http://localhost:3000" }
70+
DEBUG = { description = "Debug mode", required = false, default = "true" }
7871

72+
# Production profile - extends default
7973
[profiles.production]
80-
DATABASE_URL = { description = "PostgreSQL cluster", required = true }
81-
API_URL = { description = "Production API", required = true }
82-
SENTRY_DSN = { description = "Error tracking", required = true }
74+
DATABASE_URL = { description = "PostgreSQL cluster connection", required = true }
75+
API_URL = { description = "Production API endpoint", required = true }
76+
SENTRY_DSN = { description = "Error tracking service", required = true }
77+
REDIS_URL = { description = "Redis cache connection", required = true }
8378
```
8479

85-
## Configuration Precedence
80+
## Profile Inheritance
8681

87-
1. Command-line flags (`--provider`, `--profile`)
88-
2. Environment variables (`SECRETSPEC_PROVIDER`, `SECRETSPEC_PROFILE`)
89-
3. Project config (`[projects.{name}]`)
90-
4. Global defaults (`[defaults]`)
91-
5. Built-in defaults
82+
- All profiles automatically inherit from `[profiles.default]`
83+
- Profile-specific values override default values
84+
- Use the `extends` field in `[project]` to inherit from other secretspec.toml files

0 commit comments

Comments
 (0)