Source.

Press § (tilde) or Alt + 2 1 to open the console and then type the command.

cash = 5000 gold, add a number after to get a specific amount, for example "cash 500" gives you 500 gold.
piety = 5000 piety, add a number after to get a specific amount
prestige = 5000 prestige, add a number after to get a specific amount
allow_laws = allow to change all your laws freely ... enter again to go back to limited law changing.
discover_plots = plots are always discovered ... repeat to have to search again
plots_known = (default on) plots are visible, turns it off and on
marry_anyone = (default to you can't) You can marry anyone. (only seems to the remove the close relatives restriction)
Change your religion = religion nameofreligion (for example, "religon catholic")
Change your characters culture = culture nameofculture (for example, "culture italian" or "culture danish")

Thread under the source link contains lots of helpful information. For example, a cheat event allows you to do lots of things.

For using it, make file cheats.txt with text from the thread above and put it into C:\Program Files (x86)\Steam\steamapps\common\crusader kings ii\events – then in-game type in console event 800060, and you’ll find a cheat menu.

Cheating isn’t fun, but if you want to do something crazy (like me capturing the whole map with Holy Roman Empire) – better edit save file (you can use notepad or better notepad++) in C:\Users\Username\Documents\Paradox Interactive\Crusader Kings II\save games – it allows you to do anything you can imagine.

For char id find his section in the savefile, the easiest way to do that is to look up for a combination of birthdate and name. Any character section starts with its id, like 1723= {}. Editing char skills like martial or stewardship are more accessible there, and you can try to find your consultants and wife and make them much more helpful by increasing their skills.