We propose a purely logical framework for planning in partially observable environments. Knowledge states are expressed in a suitable fragment of the epistemic logic S5. We show how to lift the effects of actions (both physical actions and sensing actions) from the state level to the epistemic level. We show how progression, regression and plan generation can be achieved in our framework.