https://github.com/yspreen/aoc
https://github.com/yspreen/aoc
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/yspreen/aoc
- Owner: yspreen
- Created: 2022-12-03T22:37:59.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-21T15:10:45.000Z (8 months ago)
- Last Synced: 2025-03-21T16:25:05.111Z (8 months ago)
- Language: Python
- Size: 14.6 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-advent-of-code - aoc-cli - - Command-line utility that helps solve problems in python: it downloads your personal input file, creates the sample source files and makes sure you don't submit answers twice *(Python)*. (Tools and Utilities)
README
# AOC CLI
(using same commands as apexatoll/aoc-cli.)
Built during a [live stream](https://www.youtube.com/watch?v=rPo43HUyZ_c&list=PL8QzwnmPB7qbvjJiEG-NJq6b2E-MA4By4).
## Usage:
### Install
```bash
cd
git clone https://github.com/yspreen/aoc.git
cd aoc
sudo python3 main.py install
echo '^ make sure to install all missing requirements that are printed out by this command'
chmod 755 main.py # make usable by other users.
```
### Solve the Puzzles
```
cd
aoc login
mkdir 2022
cd 2022
aoc year 2022 # will set THIS FOLDER as the one for 2022.
aoc day 02 # will create a NEW FOLDER called `02` that contains this day.
cd 02
echo "now do some coding and solve this puzzle 🧠"
aoc solve 1234 # part one.
aoc solve 2345 # part two.
```
### My Cookie? What's That
You can copy it from safari, chrome, or any browser that has dev tools while you're on adventofcode.com.
Simply go to the storage or application tab in your dev tools, go to adventofcode.com and copy the `session` value.
That's your key that you can use with ` aoc login `.
Super secret hint: if you add a space in front of a command in bash and most shells, it won't get added to your history so you can't accidentally reveal it later when doing a backwards history search.

### Available Commands:
```
aoc -d / aoc day :
Will create a new folder to solve the day numbered .
aoc -y / aoc year :
Will set up the current folder to contain puzzles for year .
aoc -s / aoc solve :
Will attempt to solve the current puzzle with answer .
aoc -k / aoc login :
Will use your auth cookie to sign you in. Credentials stored (and git ignored automatically) in the current directory.
aoc -r / aoc refresh :
Will reload the puzzle markdown and input.
aoc -i / aoc install :
Will install this script in /usr/local/bin.
(requires sudo.)
```
## Feedback?
Reach out on twitter [@spreen_co](https://twitter.com/spreen_co).
I also do advent of code every day on [twitch](https://www.twitch.tv/at_spreen_co) and have all of my solutions here: [adventofcode](https://github.com/yspreen/adventofcode)
[](https://twitter.com/spreen_co)