netlify-cli
Skill11 starsChanged 54 days agoMITView on GitHub
使用 Netlify CLI 完成安装、认证、站点关联、本地开发、环境变量管理与部署。
- Reads credentials
- Installs packages
In this repository57 other files it gives its agents.
- AGENTS.mdAGENTS.md
- browser-session-handoffSkill
- deep-researchSkill
- find-skillsSkill
- github-desktop-releaseSkill
- gpt6-pro-consultSkill
- santa-methodSkill
- skill-creatorSkill
- skill-lifecycle-managerSkill
- yq-clear-contextSkill
- yq-pre-push-checksSkill
- yq-simplify-codeSkill
- yq-stable-testsSkill
- yq-windows-trash-cleanerSkill
- electron-developmentSkill
- frontend-designSkill
- yq-vps-vpn-deploySkill
- data-scraper-agentSkill
- docxSkill
- general-videoSkill
- github-readme-visualsSkill
- html-design-polishSkill
- hyperframes-animationSkill
- hyperframes-audioSkill
- hyperframes-cliSkill
- hyperframes-coreSkill
- hyperframes-creativeSkill
- hyperframes-keyframesSkill
- hyperframes-registrySkill
- hyperframesSkill
- imagegenSkill
- impeccableSkill
- jianying-editorSkill
- make-interfaces-feel-betterSkill
- media-useSkill
- pdfSkill
- ppt-nanoSkill
- pptxSkill
- remotion-video-creationSkill
- ui-ux-pro-maxSkill
- wechat-articleSkill
- xlsxSkill
- yq-editorial-presentation-htmlSkill
- yq-ui-checksSkill
- yq-article-style-imitationSkill
- yq-doc-maintenanceSkill
- yq-remove-reasoning-leaksSkill
- yq-technical-writingSkill
- yq-translate-docsSkill
- contract-reviewSkill
- creating-financial-modelsSkill
- dxy-task-clarifySkill
- healthcare-cdss-patternsSkill
- healthcare-emr-patternsSkill
- healthcare-eval-harnessSkill
- healthcare-phi-complianceSkill
- xhs-pharma-social-listeningSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Check if already linked with netlify status.
- Very specific: line 134
Server-side (Functions): Use Netlify.env.get("VAR") (preferred) or process.env.VAR
- Very specific: line 135
Client-side (Vite): Only VITE_-prefixed vars via import.meta.env.VITE_VAR
- Very specific: line 136
Client-side (Astro): Only PUBLIC_-prefixed vars via import.meta.env.PUBLIC_VAR
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Netlify CLI and Deployment
Installation
npm install -g netlify-cli # Global (for local dev)
npm install netlify-cli -D # Local (for CI)Requires Node.js 18.14.0+.
Authentication
netlify login # Opens browser for OAuth
netlify status # Check auth + linked site statusFor CI, set NETLIFY_AUTH_TOKEN environment variable instead.
Linking a Site
Check if already linked with netlify status. If not:
# Interactive
netlify link
# By Git remote (if using Git)
netlify link --git-remote-url https://github.com/org/repo
# Create new site
netlify init # With Git CI/CD setup
netlify init --manual # Without Git CI/CDSite ID is stored in .netlify/state.json. Add .netlify to .gitignore.
Deploying
Git-Based Deploys (Continuous Deployment)
Set up with netlify init. Automatic deploys trigger on push/PR:
- Push to production branch → production deploy
- Open PR → deploy preview with unique URL
- Push to other branches → branch deploy
Build runs on Netlify's servers. Configure build settings in netlify.toml.
Manual / Local Deploys (No Git Required)
Build locally, then upload:
netlify deploy # Draft deploy (preview URL)
netlify deploy --prod # Production deploy
netlify deploy --dir=dist # Specify output directoryThis works without Git — useful for prototypes, local-only projects, or CI pipelines.
Local Development
Option 1: netlify dev
netlify devWraps your framework's dev server and provides:
- Environment variable injection
- Functions and edge functions
- Redirects and headers processing
Option 2: Netlify Vite Plugin (Vite-based projects)
For projects using Vite (React SPA, TanStack Start, SvelteKit, Remix), the Vite plugin provides Netlify platform primitives directly in the framework's dev server:
npm install @netlify/vite-plugin// vite.config.ts
import netlify from "@netlify/vite-plugin";
export default defineConfig({ plugins: [netlify()] });Then run your normal dev command (npm run dev) — no netlify dev wrapper needed. This gives you access to Blobs, DB, Functions, and environment variables during development.
See the netlify-frameworks skill for framework-specific local dev guidance.
Environment Variables
CLI Management
# Set
netlify env:set API_KEY "value"
netlify env:set API_KEY "value" --secret # Hidden from logs
netlify env:set API_KEY "value" --context production # Context-specific
# Get
netlify env:get API_KEY
# List
netlify env:list
netlify env:list --plain > .env # Export to file
# Import from file
netlify env:import .env
# Delete
netlify env:unset API_KEYContext Scoping
Variables can be scoped to deploy contexts:
netlify env:set API_URL "https://api.prod.com" --context production
netlify env:set API_URL "https://api.staging.com" --context deploy-preview
netlify env:set DEBUG "true" --context branch:feature-xAccessing in Code
- Server-side (Functions): Use
Netlify.env.get("VAR")(preferred) orprocess.env.VAR - Client-side (Vite): Only
VITE_-prefixed vars viaimport.meta.env.VITE_VAR - Client-side (Astro): Only
PUBLIC_-prefixed vars viaimport.meta.env.PUBLIC_VAR
Never use VITE_ or PUBLIC_ prefix for secrets — these are exposed to the browser.
Useful Commands
| Command | Description |
netlify status | Auth and site link status |
netlify dev | Start local dev server |
netlify build | Run build locally (mimics Netlify environment) |
netlify deploy | Draft deploy |
netlify deploy --prod | Production deploy |
netlify dev:exec <cmd> | Run command with Netlify environment loaded |
netlify env:list | List environment variables |
netlify clone org/repo | Clone, link, and set up in one step |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

