When using greening new
to auto-create and push a repo to GitHub, you'll need a GitHub token with proper permissions. This token allows Greening to authenticate with the GitHub API on your behalf and create new repositories for your projects.
Here’s how to generate one and use it securely:
🔐 Step 1: Generate a New Token
- Visit github.com/settings/tokens
- Click "Generate new token"
-
Use the following settings:
-
Note:
Greening CLI access
- Expiration: Choose one (90 days or custom)
-
Scopes: Check the box for:
-
repo
(Full control of private repositories)
-
-
Note:
- Click "Generate token" and copy it immediately.
🧠 Step 2: Add It to Your Environment
For security, never hard-code your token into your project.
Instead, add it to your environment using one of the following:
Unix/macOS
export GITHUB_TOKEN=ghp_your_token_here
You can also add this to your ~/.bashrc
, ~/.zshrc
, or ~/.bash_profile
.
Windows (Command Prompt)
set GITHUB_TOKEN=ghp_your_token_here
Windows (PowerShell)
$env:GITHUB_TOKEN = "ghp_your_token_here"
✅ Step 3: Use It with Greening
Now that your token is available, Greening will detect it automatically.
Just run:
greening new
If you have create_github_repo: true
in your greening.yaml
config, Greening will:
- Create a new GitHub repo
- Add the remote
- Push your project
No extra steps. ✨
🧼 Bonus: Keeping Your Token Safe
-
Don’t commit
.env
files or shell profiles to public repos. - Rotate your token periodically, especially if it becomes exposed.
- Use fine-grained tokens for more control (GitHub now supports these).
Greening aims to make shipping your ideas painless — and this is a big part of that. By setting up your token once, you’ll unlock powerful automation across every new project.
Happy shipping 🌱
—
Got questions? Open an issue or join the discussion at
chris-greening
/
greening
greening is an opinionated, lightweight project automation tool for solo developers and creative coders. With just a few commands, you can scaffold a production-ready Python package — complete with docs, tests, GitHub Actions workflows, PyPI packaging, and an auto-deployed GitHub Pages site. No boilerplate. No setup hell. Just instant polish.
🌱 Greening
greening
is an opinionated, full-stack project automation tool for solo developers and creative coders.
With just a few commands, you can scaffold a production-ready Python package — complete with docs, tests, GitHub Actions workflows, PyPI packaging, and an auto-deployed GitHub Pages site No boilerplate. No setup hell. Just instant polish.
Table of Contents
- 🍃 Why
greening
? - 🌿 Key features
- 🌲 Getting started
- 🌻 GitHub authentication
- 🌳 Blog posts
- 🌴 Philosophy
- 🍀 Support
🍃 Why greening
?
Most devs never ship their tools — not because the code isn’t good, but because the surrounding friction is too high:
- How do I structure the project?
- How do I set up CI/CD, tests, and linting?
- How do I make it look legit?
- How do I talk about it?
greening
answers all of that in one opinionated workflow.
🌿 Key features
greening
automates your project creation pipeline:
✅ greening init
…