Goal provides automatic project metadata management using your git configuration and license preferences. This guide explains how the user configuration system works and how to manage it.
The user configuration system:
~/.goalWhen you run Goal for the first time, it will:
git config user.namegit config user.email======================================================================
📄 License Selection
======================================================================
Please select your preferred default license:
1. Apache License 2.0
2. MIT License
3. GNU General Public License v3.0
4. BSD 3-Clause License
5. GNU General Public License v2.0
6. GNU Lesser General Public License v3.0
7. GNU Affero General Public License v3.0
8. Mozilla Public License 2.0
Enter your choice [1]:
{
"author_name": "Tom Sapletta",
"author_email": "info@softreck.com",
"license": "Apache-2.0",
"license_name": "Apache License 2.0",
"license_classifier": "License :: OSI Approved :: Apache Software License"
}
If git is not configured, Goal will prompt you:
âš Git user information not configured!
Please configure git first:
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
Enter your name: Tom Sapletta
Enter your email: info@softreck.com
Every time you run goal, it automatically updates:
# Before
authors = [
{name = "Original Author", email = "original@example.com"}
]
license = "MIT"
# After - Goal ADDS you, doesn't replace
authors = [
{name = "Original Author", email = "original@example.com"},
{name = "Tom Sapletta", email = "info@softreck.com"},
]
license = {text = "Apache-2.0"}
classifiers = [
"License :: OSI Approved :: Apache Software License",
]
{
"author": "Original Author <original@example.com>",
"contributors": [
"Tom Sapletta <info@softreck.com>"
],
"license": "Apache-2.0"
}
authors = ["Original <old@email.com>", "Tom Sapletta <info@softreck.com>"]
license = "Apache-2.0"
Goal updates license badges automatically:
<!-- Apache-2.0 -->
[](https://opensource.org/licenses/Apache-2.0)
<!-- MIT -->
[](https://opensource.org/licenses/MIT)
<!-- GPL-3.0 -->
[](https://www.gnu.org/licenses/gpl-3.0)
Creates or updates:
## License
Apache License 2.0 - see [LICENSE](LICENSE) for details.
Creates or updates:
## Author
Created by **Tom Sapletta** - [info@softreck.com](mailto:info@softreck.com)
Goal intelligently manages authors:
# Before: Empty or no authors field
authors = []
# After: Goal adds you
authors = [
{name = "Tom Sapletta", email = "info@softreck.com"}
]
# Before: Someone else is the author
authors = [
{name = "Alice Developer", email = "alice@example.com"}
]
# After: Goal adds you as co-author
authors = [
{name = "Alice Developer", email = "alice@example.com"},
{name = "Tom Sapletta", email = "info@softreck.com"},
]
# Before: You're already listed
authors = [
{name = "Tom Sapletta", email = "info@softreck.com"}
]
# After: No change (Goal checks by email)
authors = [
{name = "Tom Sapletta", email = "info@softreck.com"}
]
$ goal config
======================================================================
📋 Goal User Configuration
======================================================================
Config file: /home/tom/.goal
Current settings:
Author name: Tom Sapletta
Author email: info@softreck.com
License: Apache License 2.0 (Apache-2.0)
💡 Tip: Run 'goal config --reset' to reconfigure
$ goal config --reset
# This will:
# 1. Delete current configuration
# 2. Run first-time setup again
# 3. Save new preferences
You can manually edit ~/.goal:
{
"author_name": "Your Name",
"author_email": "your@email.com",
"license": "MIT",
"license_name": "MIT License",
"license_classifier": "License :: OSI Approved :: MIT License"
}
| # | License | SPDX ID | Use Case |
|---|---|---|---|
| 1 | Apache License 2.0 | Apache-2.0 | Permissive, patent protection |
| 2 | MIT License | MIT | Simple, permissive |
| 3 | GNU GPL v3.0 | GPL-3.0 | Strong copyleft |
| 4 | BSD 3-Clause | BSD-3-Clause | Permissive, academia |
| 5 | GNU GPL v2.0 | GPL-2.0 | Legacy copyleft |
| 6 | GNU LGPL v3.0 | LGPL-3.0 | Library copyleft |
| 7 | GNU AGPL v3.0 | AGPL-3.0 | Network copyleft |
| 8 | Mozilla Public License 2.0 | MPL-2.0 | Weak copyleft |
Each license gets an appropriate badge:
# 1. Initialize git
git init
git config user.name "Tom Sapletta"
git config user.email "info@softreck.com"
# 2. Run goal (first time will configure)
goal init
# 3. Everything is automatically set up!
# 1. Clone the repository
git clone https://github.com/org/project.git
cd project
# 2. Make your changes
# Edit files...
# 3. Run goal
goal
# Goal will:
# - Keep existing authors
# - Add you as co-author
# - Use your license preference for new files
# Each team member runs:
goal config
# Their settings are stored locally in ~/.goal
# Project files get updated with all contributors
Problem: Goal can’t detect git user information
Solution:
git config --global user.name "Your Name"
git config --global user.email "your@email.com"
Problem: You want to change your author information
Solution:
# Option 1: Reset and reconfigure
goal config --reset
# Option 2: Edit ~/.goal manually
nano ~/.goal
Problem: Project files not getting license updates
Solution:
goal --dry-runProblem: Existing authors being replaced
Solution: This shouldn’t happen - Goal always adds authors. If it does:
goal --versionpip install --upgrade goalProblem: README.md not getting badge updates
Solution:
{
"author_name": "string", // Your full name
"author_email": "string", // Your email address
"license": "string", // SPDX license identifier
"license_name": "string", // Human-readable license name
"license_classifier": "string" // PyPI classifier for license
}
{
"author_name": "Tom Sapletta",
"author_email": "info@softreck.com",
"license": "Apache-2.0",
"license_name": "Apache License 2.0",
"license_classifier": "License :: OSI Approved :: Apache Software License"
}
{
"author_name": "Jane Developer",
"author_email": "jane@example.com",
"license": "MIT",
"license_name": "MIT License",
"license_classifier": "License :: OSI Approved :: MIT License"
}
You can access user config in Python:
from goal.user_config import get_user_config
config = get_user_config()
print(config.get('author_name'))
print(config.get('license'))
For CI/CD, pre-configure ~/.goal:
# .github/workflows/release.yml
- name: Setup Goal Config
run: |
cat > ~/.goal << EOF
{
"author_name": "$",
"author_email": "$",
"license": "Apache-2.0",
"license_name": "Apache License 2.0",
"license_classifier": "License :: OSI Approved :: Apache Software License"
}
EOF
- name: Run Goal
run: goal --all
Q: Does Goal modify LICENSE files? A: No, Goal only updates project metadata files (pyproject.toml, package.json, etc.) and README badges. You need to add the LICENSE file yourself.
Q: Can I use different licenses for different projects? A: Yes, the license in ~/.goal is just your default preference. Each project can have its own license, and Goal will respect it while adding you as an author.
Q: What if I want to change my email?
A: Run goal config --reset or edit ~/.goal manually.
Q: Does this work with Poetry/npm/cargo? A: Yes! Goal updates the underlying project files (pyproject.toml, package.json, Cargo.toml) which are used by these tools.
Q: Can I disable automatic metadata updates? A: Currently no, but you can skip specific files by not including them in your commits.