Loading topic
export), and can read short Python or JavaScript snippets. It covers the .env file: what it is, how its syntax works, how code loads it, and where it goes wrong. Keeping it out of Git 6 min read.env file holding LLM_API_KEY from the previous chapter. The goal is to make sure that file can never end up in a commit, and to know what to do if it already has.5 min read.env file from the earlier chapters. The goal here is to get the key into your program without putting it in the source.5 min read.env file, and your code reads it. This chapter shows how to confirm the whole chain works without the key appearing in your terminal, logs, or screenshots. It assumes you can run shell commands, read short Python snippets, and know that an HTT5 min read.env out of Git. It also assumes you have used GitHub (or a similar host) and have seen a YAML file. The examples use GitHub Actions and Docker. Other CI systems and hosting platforms have the same6 min read.gitignore entry keeps .env out of Git, but it does nothing about a key pasted into a source file, a test fixture, a notebook output, or a config file you forgot to ignore. This chapter adds automated checks that look at what you are about to commit and stop the commit if it contains a secret.6 min read.gitignore), you have read earlier chapters on environment variables and .env files, and you can read short Python snippets. It covers the response to a leaked LLM API key: the order of actions, what each action does, and what cleanup i6 min read.env file, CI secrets, and the steps for revoking and rotating a key. It also assumes you can read short Python snippets and have a rough idea of how cloud permissions work. The examples use6 min read