This Go program fetches startup data batch-wise from Y Combinator's public Algolia index, stores it in a local SQLite database, and prints a table of the startups.
- Fetches startup data via Algolia using the
YCCompany_productionindex. - Stores data locally in an SQLite database (
yc_startups.db). - Displays startup name, website, and location in a formatted table.
- Interactive TUI to choose a startup and view details.
- Handles duplicate entries by ignoring conflicts based on startup slug.
- Go (version 1.18 or later recommended)
-
Clone the repository (if you haven't already):
git clone <repository_url> cd <repository_directory>
-
Tidy dependencies: The necessary dependencies (
github.com/mattn/go-sqlite3) are listed in thego.modfile. They will be downloaded automatically when you build or run the program. You can also fetch them explicitly:go mod tidy
or
go get . -
Build the program (optional): You can build an executable:
go build -o yc_fetcher
This will create an executable file named
yc_fetcher. -
Run the program: Provide either a batch name or a full YC companies URL. For example, to fetch data for the "Summer 2023" batch:
If you built the executable:
./yc_fetcher "Summer 2023"Alternatively, you can run directly using
go run:go run . "Summer 2023"
After data is stored, the program launches a simple TUI where you can select a startup to see its details and any contact email found on its website.
- The program will automatically create an SQLite database file named
yc_startups.dbin the same directory where you run the command. - If you run the program multiple times with different batch names, the new data will be added to the same database. If a startup from a new batch pull already exists (based on its unique 'slug'), it will not be re-added.
main.go: Contains the main application logic, including command-line argument parsing and orchestration of fetching and storage. Also includes the display logic.models.go: Defines theStartupdata structure.fetcher.go: Contains the logic for fetching data from the YC API.database.go: Contains the logic for database initialization and data storage.go.mod,go.sum: Go module files.yc_startups.db: (Created after first run) The SQLite database file.